Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MODAL Form - return parameter
Message
De
13/08/1998 16:02:18
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/08/1998 20:38:56
David Moreau
Iglesia Ni Cristo - Dnm
Quezon, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00125213
Message ID:
00126693
Vues:
19
>Cetin,
>
>I think Martin wants to avoid global variables. Passing a return value in a global value seems to me a dangerous practice and anti-OOP.
>
>>This is the hard way if ever could be done. To make it easy for a start create a var before calling and change it :
>>
mRetVal = 0
>>l_Info = CREATEOBJECT("MSG_Question","Do You wann really exit ?")
>>l_Info.show()
>>*in MSG_Question instead of form.retpar directly set mretval
I also think it's not wise to use public var for this - your modal form may call another, then that one would have to use the same variable, or use another one, so we'd either end up being unsure which one is used (though, if I'm not wrong of modal forms - there can be only one at a time), or having to do lots of bookkeeping of the public vars used.

I use a private variable in the procedure which calls the modal form - no matter if it's a .prg, or a method.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform