Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Public and local variable of the same name?
Message
From
18/01/2008 02:54:36
 
 
To
17/01/2008 16:08:16
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01282432
Message ID:
01282881
Views:
9
Hi Mike,
>>>There is nothing "better" about a public property on a public object than a public variable. Making the properties non-public with get/set methods or access/assign is the only thing that would make it better.
>>
>>not disputing the base argument that a global memvar and a globally accessible property can create identical code problems, your statement sounds a bit harsh from my point of view.
>
>I don't think we're disagreeing at all. A completely open property is no better than a public variable unless/until one uses the bindevent, access/assign or get/set to protect a property against code problems. :)

I assumed we were again not far from each other's POV, but the post perhaps could be understood that it makes no difference if you don't use _access or bindevent() right from start. Case in point: one of the features of vfp7 was the sys(3054, nn, lcMemvar).

I tried for some time to get some access method to hook/log the showplan - not possible back then without much redundant code or a SQL-Wrapper class. Having the option to specify a global property there (which can be a global "necessity") would have helped a lot, but was not planned for. So I asked for (and received! MS listened to dev wishes...) another possibility to persisist showplan info via sys().

best regards

thomas
Previous
Reply
Map
View

Click here to load this message in the networking platform