Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
#DEFINE problem
Message
From
13/02/2007 14:06:37
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01194874
Message ID:
01195292
Views:
19
>>Did you read my message#1194892? In my class I use this_access to "automate" the addproperty process, it's really slick. Once the object is global, so are all the properties you add by simply assigning them.
>
>It is slick. Better than adding properties to the _application object certainly.
>
>But I'm still not seeing an advantage other than OOP purity over declaring global vars..? To me, I write less code and get equal or better capability using global variables..
>
>I still haven't gone through the wiki references in Naomi's post - maybe something in there will turn a light on for me..

I will give you a few advantages.

One is the ease of clearing the memvars. All "global" variables which are logically a group can be tied to one object, once you release this object, all the memvars are gone. The alternative with global variables is to use a common naming naming convention, and clear the relevant variables with the syntax "Rele all like gGroup*" or something similar.

Another advantage is the ease of debugging. In the locals window, the "memvar" object shows as an object, and can easily be checked by opening it, and it will show as a group.

The there's Intellisense. Type the name of the object and a period, and all the properties will show.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform