Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DO FORM MyForm TO uResult--Undefined Variable
Message
De
14/09/1999 10:40:58
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00264264
Message ID:
00264450
Vues:
22
>>PMFJI, but what you get is exactly what you're supposed to get. Returning .F. in the Init method prevents the form from beeing instanciated, so it's perfectly normal that the Unload event isn't fired - there is nothing to unload.
>
>Hi:
>
>Thanks for responding, but the Unload event does fire. I put a WAIT WINDOW "Unload event firing" in the Unload event. However, I believe you are correct that because the Form has not fully instantiated when the unload event fires.
>
>I'm looking for a reasonable work around.
>
>Thanks!
>
>--Paul


Paul,
Unload event fires but form is not initialized. So you get no return value. There is a clumsy workaround :
local myVal && To demonstrate it doesn't matter if it's local
do form myValGetter with .f., myVal to myVal && With always passes by reference
? "Myval is now", myVal
do form myValGetter with .t., myVal to myVal

* Form.init
lparameters tlInit, tnRetVal
tnRetVal = 100
thisform.RetVal = tnRetVal * 3
return tlInit

* Form.unload
return thisform.RetVal
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform