Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get the object value from parent form ?
Message
De
22/05/2014 14:26:33
Walter Meester
HoogkarspelPays-Bas
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01600260
Message ID:
01600509
Vues:
78
>>
>>Parameter objects are passed by reference. The temptation is for Child.Init() to simply store that reference somewhere (because that's easy), then use that to access the passed properties. If at some point the original parameter object disappears, but after that the child needs to access its properties via the stored reference, what happens then?
>>
>>Yes, this can be avoided by the child storing the individual parameter object properties, at which point the object reference can be discarded. But that takes extra work and isn't obvious.
>>
>
>An object will not be released as long as at least one reference to it exists. Storing reference to the parameter object in a property of the child form guaranteed that it'll be available as long as form exists.

That is not correct. You can explicitely destroy objects, such a forms, or objects in collections, which will set any reference to NULL
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform