Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How Do I Return a Value From An Object
Message
 
 
To
18/06/2003 09:00:10
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00800953
Message ID:
00801135
Views:
30
This message has been marked as the solution to the initial question of the thread.
>Thank you Craig,
>
>
>However, I seem to be in a catch-22 here:
>
>Since I have to issue myObj.Show() to activate (display) the object,
>and, since my program execution suspends at that point until
>the object is completely destroyed, I can't evaluate a method or
>property until AFTER the object has been destroyed which, of course,
>generates the error "object does not exist".
>
>Am I doing something bass ackwards?
>

David,
This is obviously a modal form scenario with a button (or other control) that releases the form. Instead of releasing the form, call the Hide() method instead. Hiding the form allows program execution to continue but does not release the object. Ex.
local myobj, luretval
myobj = createobject('mycustomform')
myobj.Show(1)

* OK button issues THISFORM.Hide()

luretval = myobj.SomeProperty
myobj.Release()
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform