Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public Variables or Object Properties
Message
From
24/05/2001 10:28:01
 
 
To
24/05/2001 10:01:04
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00510878
Message ID:
00510899
Views:
24
Hi!

It does not matter, just better looking in your Locals window ;)

What is really matter is creating of custom objects holding specific group of the public properties. Usualy, is is child object to the Application object that is added in run-time. For example, you have a main clients form. All child forms should work with whatever client is currently selected in the main form. However, all forms are modeless, so when you change the record in the main form, all other forms should reflect the information. You maintain the custom object in the memory for special group of variables - properties of the client. All other forms work and refreshed using this object and properties. Now you refresh properties on the main form, than call refresh of all other forms. No messing with private data sessions. No mesing with current record etc etc. The similar object holds user preferences. Another object holds the aplication global settings, like a pth to the server. In addition, you can define a custom methods in the objects, like "changeDatabasePath" or "RefreshClient" or "CalculateClientStatistics" or "ConfigureUserOptions". That is the OOP way. Just moving public variables to application global object makes no difference.

HTH.

>Afternoon
>
>Just a query.
>
>I have started replacing my Public variables with Properties on my "Application" object, is this good practice, or is it down to preference?
>
>Thanks
>Kev
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform