hi all,
can someone help me what's going on with this...
ancestor class not found, is it bug or something wrong with me ?, but it's working when create the descendant form at the first time.
(http://i253.photobucket.com/albums/hh79/acakadut/testinheritance.gif)
unit ancestor
unit Unit2;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls;
type
{ TForm2 }
TForm2 = class(TForm)
ImageList1: TImageList;
pcclass: TPageControl;
tsclass: TTabSheet;
tbclass: TToolBar;
btnone: TToolButton;
btntwo: TToolButton;
btnthree: TToolButton;
private
{ private declarations }
public
{ public declarations }
end;
var
Form2: TForm2;
implementation
initialization
{$I unit2.lrs}
end.
form ancestor
object Form2: TForm2
Left = 362
Height = 300
Top = 267
Width = 400
HorzScrollBar.Page = 399
VertScrollBar.Page = 299
Caption = 'Form2'
ClientHeight = 300
ClientWidth = 400
object tbclass: TToolBar
Height = 26
Width = 400
Caption = 'tbclass'
EdgeBorders = [ebTop, ebBottom]
TabOrder = 0
object btnone: TToolButton
Left = 1
Top = 2
Caption = 'btnone'
end
object btntwo: TToolButton
Left = 24
Top = 2
Caption = 'btntwo'
end
object btnthree: TToolButton
Left = 47
Top = 2
Caption = 'btnthree'
end
end
object pcclass: TPageControl
Height = 274
Top = 26
Width = 400
ActivePage = tsclass
Align = alClient
TabIndex = 0
TabOrder = 1
object tsclass: TTabSheet
Caption = 'tsclass'
end
end
object ImageList1: TImageList
left = 227
top = 68
end
end
unit descendant
unit Unit3;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls, CheckLst, Grids, ComCtrls, Unit2 ;
type
{ TForm3 }
TForm3 = class(TForm2)
CheckListBox1: TCheckListBox;
LabeledEdit1: TLabeledEdit;
StaticText1: TStaticText;
StringGrid1: TStringGrid;
private
{ private declarations }
public
{ public declarations }
end;
var
Form3: TForm3;
implementation
initialization
{$I unit3.lrs}
end.
form descendant
inherited Form3: TForm2
Caption = 'Form3'
inherited tbclass: TToolBar
inherited btnone: TToolButton
end
inherited btntwo: TToolButton
end
inherited btnthree: TToolButton
end
end
inherited pcclass: TPageControl
inherited tsclass: TTabSheet
ClientHeight = 248
ClientWidth = 392
object StaticText1: TStaticText
Left = 81
Height = 17
Top = 66
Width = 65
Caption = 'StaticText1'
end
object LabeledEdit1: TLabeledEdit
Left = 88
Height = 23
Top = 129
Width = 80
EditLabel.Left = 88
EditLabel.Height = 14
EditLabel.Top = 109
EditLabel.Width = 62
EditLabel.Caption = 'LabeledEdit1'
EditLabel.ParentColor = False
ParentColor = False
TabOrder = 0
end
object CheckListBox1: TCheckListBox
Left = 260
Height = 80
Top = 152
Width = 100
TabOrder = 1
end
object StringGrid1: TStringGrid
Left = 168
Height = 100
Top = 56
Width = 200
ColCount = 5
FixedColor = clBtnFace
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goSmoothScroll]
RowCount = 5
ScrollBars = ssAutoBoth
TabOrder = 2
TabStop = True
end
end
end
inherited ImageList1: TImageList
end
end
using 0.9.24 on WinXP
TIA
san