Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning a value from a form in a class
Message
From
20/06/2000 14:56:50
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00380150
Message ID:
00382327
Views:
25
All,

private vars are an exceptionally bad idea - for much of the same reasons that publics are - plus - if decoupling is a goal - there is nothing that breaks it worse than sharing live variables.

I would suggest forgetting that the PRIVATE declaration even exists. I have all but fired programmers when I see a PRIVATE in their code...

Ken

>Randy:
>
>Declare a variable PRIVATE in the calling program. In the UNLOAD method of the form, set the variable to some value. The value will be available when you return to the calling program. Note that this only works with modal forms.
>
>PRIVATE lRetval
>lRetval = .F.
>loForm = createobject('myform')
>loForm.show()
>
>if lRetval = .T.
> *-some action
>else
> *- some action
>endif
Ken B. Matson
GCom2 Solutions
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform