Problem with visual form inheritance for form contains frame.
Original Reporter info from Mantis: bpranoto
-
Reporter name: Bambang Pranoto
Original Reporter info from Mantis: bpranoto
- Reporter name: Bambang Pranoto
Description:
Steps to reproduce:
- Create a form Form1
- Create a frame Frame1 contains a button
- Place Frame1 onto Form1
- Create form Form2 descended from Form1 through File -> New .. ->
Inherited Items
- 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:
-
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. -
As soon you change anything in Form2, the wrong "inline Frame1_1:
TFrame1" always comes back again.
Mantis conversion info:
- Mantis ID: 13676
- Version: 0.9.26.2
- Fixed in version: 0.9.29 (SVN)
- Target version: 1.0.0
- LazTarget: 1.0