Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find out, if control is added during form's init or late
Message
From
15/04/2002 16:21:24
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00644956
Message ID:
00645190
Views:
17
>Nadya,
>
>>I have a different idea. Put amembers(thisform.aMembBefore) in the first line of form's Init and at the last line in form's init. This way you would have array of objects, which were instantiated in design-time (before form's Init) and after.
>
>Thanks for your reply! You're right, this would work as well, when the form needs to know, what objects are being added.
>
>But if the control needs to know in it's Init, if it is added after the form's init has been run, this couldn't be determined easily.

I've never tried this... and I don't know if it'll work either, but... how about checking the name of the object from parent's side:
oRef=eval("this.parent."+this.name)
if type("oRef.name")...
   if oRef.name=this.name
I think the parent would see it under its proper name if it was added at design time, but won't if it's still not done with its .init, and would only then assign it a name (or would never do so, if .init returns .f.).
If this works, it may be easier than (re)cursing the call stack.

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