Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning value from Class
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00158041
Message ID:
00158476
Vues:
23
I like this method. Sleek, Clean, and not too much code to do with
hiding forms, etc...

Thanks.
Michel.

================= Original message follows ==================
>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()
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform