Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MODAL Form - return parameter
Message
From
13/08/1998 16:02:18
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
To
11/08/1998 20:38:56
David Moreau
Iglesia Ni Cristo - Dnm
Quezon, Philippines
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00125213
Message ID:
00126693
Views:
21
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform