[Lazarus] Code tooltips
Lord Satan
reimgrab at web.de
Fri May 8 02:08:05 CEST 2009
Hello,
I am just trying Lazarus and find a bug with form inheritance when the
parent form contains frame.
Here is the step to produce it:
1. Create a form Form1
2. Create a frame Frame1 contains a button
3. Place Frame1 onto Form1
4. Create form Form2 descended from Form1 through File -> New .. ->
Inherited Items
5. Change something on Form2 like repositioning the frame.
Compile and run, when Form2 shows up an error message will be poped
up: Project raised exception class "EComponentError" with message:
Duplicate name: A Component named "Frame1_1" already exists.
The problem lies in the lfm file which generated as follows:
inherited Form2: TForm2
Left = 452
Top = 67
Caption = 'Form2'
inline Frame1_1: TFrame1 ==> HERE IS THE BUG
Left = 48
Top = 96
Visible = True
inherited Button1: TButton
end
end
end
if I change "inline Frame1_1: TFrame1" to "inherited Frame1_1:
TFrame1" everything goes well. However, there are still some problems:
1. I can't display the .lfm file as Form, lazarus complains class
TFrame1 is not found. Manually adding Frame1 to uses clause of
unit2.pas solves the problem.
2. As soon you change anything in Form2, the "inline Frame1_1:
TFrame1" always comes back again.
I am using Lazarus 0.9.26.2 on Windows XP.
Is this a known bug?
--
Bambang P
More information about the Lazarus
mailing list