Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Objects
Message
From
17/07/2001 09:19:12
 
 
To
16/07/2001 23:14:24
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, United States
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00531332
Message ID:
00531476
Views:
13
I agree. An Application Object is what he wants. However, I think it should be PRIVATE in the Main.Prg.


>Hi Bob,
>Seems to me that you are asking for an Application service. I use one public variable, ThisApp, and it has ways of getting that kind of information. In the case of UserName, it's held in the UserHandler object. You want to be able to test the form on it's own, without the full Application running. Therefore, the code might look like this:
>
>LOCAL UserName
>IF VARTYPE(ThisApp) = "O"
>   UserName = ThisApp.GetProperty("UserName")
>   * The GetProperty method of the app can look at various
>   * objects in the app object and see if they have the property
>   * we're interested in.
>ELSE
>   * Perhaps create an object here to help,
>   * or default to something easy.
>   UserName = "PC User"
>ENDIF
>
>
>>If I were to create a custom object, for keeping track of few propertities like
>>say username and userlevel (application level)
>>and if I put the object on my base class forms....
>>
>>How could i set the propertites, of the base object once, and have all the other forms which the object be able to read the propertites. ?
>>
>>I hope that I am making sense here. what I am attempting to do, is not use a public array to store this type of but to use a more oop method ... should this,. or can this be done ?
>>
>>Bob Lee
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform