Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning value from a class
Message
From
31/03/2003 18:52:57
 
 
To
31/03/2003 16:22:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00772158
Message ID:
00772221
Views:
4
You cannot receive a value in this manner. What you can do is to add a public property to the class and have the property initialized by the object. It cannot be from the Unload event however, since this event is fired when the object is destroyed, so the property won't exist after that. Then, just before releasing the object, you read the property from the calling function. It goes like this:
Myform = Createobject (MyformClass)
* Other stuff here
Result = Myform.mystring
Myform = NULL
HTH

>I have a class based on a form; in the unload event of this class, I have a return statement (return "mystring")
>
>When I instantiate the class, how can I get the returned value?
>
>Myform = Createobject(MyformClass)
>
>and then what?
Previous
Reply
Map
View

Click here to load this message in the networking platform