From: Ryan Pavlik Date: 2003-05-12T08:26:53+09:00 Subject: Re: Overriding class variables On Mon, 12 May 2003 03:14:33 +0900 elbows@spamcop.net (Nathan Weston) wrote: > Ryan Pavlik wrote in message news:<20030510194422.13279d29.rpav@nwlink.com>... > > 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 "Darn that uncertainty principle! It always gets me lost." - 8BT