Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the object value from parent form ?
Message
From
22/05/2014 14:26:33
Walter Meester
HoogkarspelNetherlands
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01600260
Message ID:
01600509
Views:
77
>>
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform