On Tue, Aug 09, 2005 at 10:44:32AM +0200, Micha Nelissen wrote:
>
> FOnCreate is called in TCustomForm.DoCreate. DoCreate is called in
> TCustomForm.Create (the constructor). Try setting a breakpoint in the
> constructor and walking through.
(Breakpoints don't seem to work under Darwin yet.)
I added/activated some DebugLn statements in the appropriate LCL files.
To my surprise, TCustomForm.DoCreate acts as if FOnCreate is not assigned.
Of course, this explains the behavior I see. (It turns out to be assigned
in my simple Hello World.)
The facts: in my misbehaving Main.lfm there is
object MainForm: TMainForm
...
OnCreate = FormCreate
and TMainForm.FormCreate(Sender: TObject) is defined in my Main.pas.
The ObjectInspector shows that the OnCreate event is set to FormCreate
and it finds the appropriate code (when clicking ...).
Next question: where is the code that loads the .lfm file and assigns
FOnCreate upon reading 'OnCreate =' from .lfm ? Where/when is that code
activated? How could that go wrong?
Thanks for all the help so far.
By the way, I have no override on the Create method in TMainForm (so
inherited was not forgotten).
Tom
--
E-MAIL: T.Verhoeff @ TUE.NL | Fac. of Math. & Computing Science
PHONE: +31 40 247 41 25 | Eindhoven University of Technology
FAX: +31 40 247 54 04 | PO Box 513, NL-5600 MB Eindhoven
http://www.win.tue.nl/~wstomv/ | The Netherlands
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives