Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where object dropped on form is instantiated?
Message
De
23/02/2010 10:34:53
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01450463
Message ID:
01450487
Vues:
45
>>>Hi,
>>>
>>>I dropped an object (class) on a form. Then in the form LOAD method I check if this object is NULL as following:
>>>
>>>isnull( thisform.MyObject )     && Returns .F.
>>>type( "thisform.MyObject" )   &&  Returns "O"
>>>
>>>
>>>So I presumed that the object is instantiated in the LOAD method of the form. But when I call a method of this object in LOAD method of the form, I get error that the object does not exist. Does it mean that the object is fully instantiated only in the INIT method of the form?
>>
>>The form's Load fires, then each of the controls' Init fires, then Form's Init fires, then Activate of the form, then Show, then GotFocus.
>>
>>So, you can not access a control from the form's Load, but you can access it from Form's Init.
>
>Thank you, Naomi.

An expanded version of Naomi's explanation:

http://fox.wikis.com/wc.dll?Wiki~HowVFPCreatesObjects
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform