form constructor never called
From: Jimmy Rasmussen (jimmyr_at_get2net.dk)
Date: 04/28/04
- Next message: Rob Kennedy: "Re: form constructor never called"
- Previous message: Bernd Karle: "music beat counter"
- Next in thread: Rob Kennedy: "Re: form constructor never called"
- Reply: Rob Kennedy: "Re: form constructor never called"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 28 Apr 2004 19:50:35 +0200
I wrote this code:
type TTestForm = class(TForm)
public
constructor Create(AOwner: TComponent);
end;
constructor TTestForm.Create(AOwner: TComponent);
begin
Showmessage('Yo the test constructor here'); //never called !
end;
I created a new form at design time.
I exchanged this line TForm2 = class(TForm)
with this one TForm2 = class(TTestForm)
Now, since delphi creates the forms automatically when the application
starts up (by calling the forms constructors I presume ...) I don't
understand why the TTestForm constructor is not called, however I suspect it
has something to do with the way the delphi streaming system operates. Of
course creating the form explicitly in the code will solve the problem, but
still, I'd like to whats going on here.
regards
Jimmy
- Next message: Rob Kennedy: "Re: form constructor never called"
- Previous message: Bernd Karle: "music beat counter"
- Next in thread: Rob Kennedy: "Re: form constructor never called"
- Reply: Rob Kennedy: "Re: form constructor never called"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|