Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_vfp.setvar help
Message
From
31/01/2000 20:29:50
 
 
To
31/01/2000 14:34:59
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00325066
Message ID:
00325391
Views:
30
>>>Are you expecting different behavior than PUBLIC gnEmployee would provide.
>
>No. I guess that is exactly the performance I need.
>
>Are you saying the scope of _vfp.setvar() definiations is only within the form which calls it?
>This seems to contradict the idea that you are creating user defined properties on what I thought was THE main vfp applicatin object. I would expect any .setvar() calls to make the variables available to all forms, or procedures ANYWHERE within the current vfp session.
>


SetVar creates variables in the current process, not properties in the global object.

>Is this also true for PUBLIC declarations?
>

PUBLICs are by their nature visible at all times unless expressly hidden by an overriding variable declaration, or passed by reference to a process or method, at which point its public nature is subverted.

>Must you declare PUBLIC in the main .prg for your project, for it to be available to all forms?
>

No, that would be true of a variable with PRIVATE scope, PUBLICs are the only variables that are visible to callers that exist above or parallel to its context of creation.

>Must you also re-delcare any PUBLIC variables you wish to reference in procedures, so that they will reference the already-declared public variables, instead of creating new local-to-the-current-form public variables?
>

No. PUBLICs are PUBLICs and always visible.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform