Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value
Message
 
 
To
30/01/1999 10:26:04
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00182149
Message ID:
00182150
Views:
10
Dan,

Only DO FORM style modal forms return the value from Unload(). With a CreateObject() form, you must use a separate interface object (there's an example on my website), or just call the Hide() method instead of Release() inside the form, grab the property back in the calling code and then release the form object.

>How do I return a value from a visual class. I have created a class based on a form. The form is Modal. In the Unload event of the form I placed return This.cRetVal.
>
>In the calling program, I have:
>
>oObject = createobject("MyObject")
>cRetVal = oObject.Show()
>
>cRetVal is always .F. when returning.
>
>What am I doing wrong?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform