Define global variable in class

Question: Hi,
I've created a class. Is it possible to define a global variable, accessible by all methods? TIA.

Answer:
Yes, it's called an attribute. If you want it available to all users of the class, make it public. If you want it available only to the class or subclasses, make it protected. If you want it only available to the class, make it private.

m@t
_________________
TULY The quality of answers is roughly proportional to the quality of the question.

The downside of being better than everyone else is that people tend to assume you're pretentious.
Copyright ?2007 - 2008 www.jt77.com