Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning value from Class
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00158041
Message ID:
00158109
Views:
17
Michael,
Another way is to set a form property on the ORIGINAL form to ldDate (we'll call it NewDate), then pass the calling form name as an object to the new form. When you have the value you need, store it to the original form object:
set classlib to CalLib
oCalendar = CREATEOBJECT('calendar', this)  
** Passes the calling form name as an object to the new form.

** In the INIT method of the 'calendar' form, add:
lParameter oCallingForm
thisform.CallingForm = oCallingForm

** Now when you have the data you need:
ldDate = oCalendar.Show()
oForm = thisform.CallingForm
oForm.NewDate = ldDate

** Finally, close the Calendar as usual. 
When you return to the calling form, the value you want will be in the form property.

HTH
Barbara

>I have a class object that is a form and I want to return a value to ldDate. Is there a way I can do this. I tried returning the value from the UNLOAD event but it didn't work. Thanks in advance.
>
>
>set classlib to CalLib
>oCalendar = CREATEOBJECT('calendar')
>ldDate = oCalendar.Show()
Barbara Paltiel, Paltiel Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform