Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing variables
Message
 
À
20/02/1997 13:27:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00021081
Message ID:
00021459
Vues:
46
>>>>>how do you pass variables between 2 different forms. The problem I am having is that I have 2 form each with a private data session. I want to assign the current record number to a variable and pass that to the other form. any suggestions. thanks fot the help.
>>>>Don't forget the ever popular PUBLIC memvar. While the new Visual world seems appalled by medieval programming traditions, this is one that will solve many problems if not abused.
>>>>The variable can be set PUBLIC in the LOAD method of either form (but not BOTH!)
>>>>HTH
>>>
>>>I Hardly use Public Variables, instead I add properties to my application class that they will be available for all forms as public variables.
>>
>>the only time i use a public var is to track the user's access level because i haven't taken the time to build an application object yet. avoid public vars as much as you can.
>
>I use them for form names also like DO FORM XPTO NAME goFrmXPTO

Probably I am a little late for this thread :) but I would like to say that I have in my app framework a custom object called *current*, which I add to app object especially for exchanging purposes. So it is filled with different properties, and all I do - get necessary value like
oApp.oCurrent.myProperty
Of course, this approach could be extended, I just used the idea from Tasmanian Traders which has oApp.oEnvironment. I prefer not to fill oApp with everything.

Hope it helps too.

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform