I am using Delphi6. On one form wich I have to use it from
different places and with different parameters, I overload
the create method with some additional parameters.
e.g. 'constructor Create(aOwner:TComponent; byWho:TForma; ReadOnly:Boolean; DokBr, WHouse:String);overload;'.
and the implementation is :
{'constructor Create(aOwner:TComponent; byWho:TForma; ReadOnly:Boolean; DokBr, WHouse:String);
begin
inherited Create(aOwner);
fKoja:=byWho;
fReadOnly:=ReadOnly;
fDokBr:=DokBr;
fSklad:=WHouse;
tDokBr:=DokBr;
end;
}
In FormCreate, depending on parameters, when I call standard TForm.Create(Form) it's OK, but, when
I call overloaded create, I have access violation.
Error occurs when I try to access some TEdit object which is on the form from design time.
When I move part of code from FormCreate into OnShow event, I don't have error code. It seems that in FormCreate wich is inherited from my constructor, all objects are not created.
Does anyone have some clue about this problem.
different places and with different parameters, I overload
the create method with some additional parameters.
e.g. 'constructor Create(aOwner:TComponent; byWho:TForma; ReadOnly:Boolean; DokBr, WHouse:String);overload;'.
and the implementation is :
{'constructor Create(aOwner:TComponent; byWho:TForma; ReadOnly:Boolean; DokBr, WHouse:String);
begin
inherited Create(aOwner);
fKoja:=byWho;
fReadOnly:=ReadOnly;
fDokBr:=DokBr;
fSklad:=WHouse;
tDokBr:=DokBr;
end;
}
In FormCreate, depending on parameters, when I call standard TForm.Create(Form) it's OK, but, when
I call overloaded create, I have access violation.
Error occurs when I try to access some TEdit object which is on the form from design time.
When I move part of code from FormCreate into OnShow event, I don't have error code. It seems that in FormCreate wich is inherited from my constructor, all objects are not created.
Does anyone have some clue about this problem.