Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form state just before and after Form.Init()
Message
From
24/12/2010 10:40:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
23/12/2010 19:08:41
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01493757
Message ID:
01493792
Views:
65
>Hi,
>
>I am aware that a from's Init() event fires only after all its controls's Init() are fired.
>
>However, inside the init() method of any of its control, I can change value of the form's property (e.g. THISFORM.Comment = 'I am changed') and I can even call a method of the form, i.e. it seems that the form are fully instantiated / are ready (although its Init() event has not yet been triggered)
>
>Let say I have a form (SCX) where I have no custom codes in its Init() event, my question is:
>Is there any different between the state of such a form after firing its Init() event and before?
>Particularly, what are the things I can't do (if any), inside the Init() event of the form's control with respect to the form itself?

- the name of the form is not set yet. Sys(1272) of any form's member will give you different result during form.init and after it
- if you're storing a reference to the form into an object, it's still not stored
- the form is (probably) still invisible, but if you do any .setfocus() during init, form.Show() and form.activate() will fire, and you may see some side effects of code firing out of sequence (specially if code in .show() and .activate() and any controls' in a pageframe's active page .uiEnable() event uses anything from the first two points - you may not get what you expect).

Other than that... not sure there's anything else that's not in place yet. Your form is nearly done, just these bits missing.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform