View Single Post
  #15  
Old 01-23-2008, 05:58 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by Novo View Post
I think the best solution for private variables is just treating them as private. The convention you use for denoting a private variable could help you.

I basically treat all variables as private / local, and use clearly-defined functions to modify them.
Yea I do it about the same way. I see private variables as more of a way of making the script idiot-proof so people other than yourself don't mess it up.
Quote:
Originally Posted by cbkbud View Post
What is thisor exactly?
Well if you used thisr. to reference private variables in the object, then what about when you're in a with (object) {} block and want to get a private variable from the calling object? Normal variables would be accessed by thiso. but you would need something thisor. for the private variables of the parent object and that is just unnecessary.
__________________
Reply With Quote