Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variables in form
Message
From
05/12/2007 11:46:29
 
 
To
04/12/2007 21:29:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01273093
Message ID:
01273282
Views:
13
>
>In summary, using public variables just to share data among form methods is not convenient. However, a few public variables in the main program may be justified. It should be possible to have a single public variable, an "application object", to store different kinds of data for your application; all kinds of data can be stored in different properties of the application object. (An application object might store user name and user level, a list of open forms, or any other information which you need once for the entire application.)

I'm not much of a theorist, and maybe we're saying the same thing differently, but it seems to me that public variables should be used only to share information between applications. If I want to create a variable which is scoped to the entire application, it would be declared Private in the main program.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform