On Mon, 12 May 2003 03:14:33 +0900
elbows / spamcop.net (Nathan Weston) wrote:

> Ryan Pavlik <rpav / nwlink.com> wrote in message news:<20030510194422.13279d29.rpav / nwlink.com>...
<snip>
> > Use @@var.  It acts like you want.
> 
> Oops, I forgot about @@var. However, that still doesn't do what I
> want. As another poster pointed out, changing @@var in the subclass
> changes it for the superclasses. Which is even more weird -- it means
> the behavior of a class can be changed simply by defining a subclass
> of it. If that is intentional, it seems like a rather odd design
> choice.

Hrm, oops, I misread your intentions in the original post.

Yes, I find this highly odd and annoying, but I guess it's there for
something useful (even though I'm not sure what that something is ;).

Anyhow, what I've done is use @instance variables for the _class_,
which is like a static variable in other languages, in that it's
unique to the given class but not subclasses.   Accessors to this
are a quick addition if they're necessary.

However, looks like you found what you wanted with the explicit
referencing of constants.

-- 
Ryan Pavlik <rpav / users.sf.net>

"Darn that uncertainty principle! It always gets me lost." - 8BT