Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Global scatter name
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00709981
Message ID:
00709999
Views:
16
>>I need a global object for users throughout my app.
>>Is this an accepted way of doing it?
>>
>>
>>
>>&& Lookup user in table then...
>>public oUser
>>scatter name oUser
>>
>
>That is as good as any. However, I make is a PRIVATE memvar at the beinning of my MAIN prg file. THis still makes the object visible to everything down the call stack. Since everything from MAIN is down the call stack, it's like a PUBLIC memvar.

Is this way better somehow?

>I also just use a global app object based on the custom class. This app object has numerous properties used throught my app, and I also add more props on the fly when I need them for various forms, reports, etc. This object has some generic methods that I also use throughout the app.

This I do already.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform