help with Magritte tutorial

Ramon Leon ramon.leon at allresnet.com
Thu Aug 9 20:59:00 MEST 2007


>  From the Smalltalk FAQ [1]: Class instance variables are 
> similar to class variables, except that they are created for 
> eachsubclass of the defining class. When a class declares a 
> class instance variable, a new variable is created for each 
> subclass of that class. Each subclass then has its own 
> instance of the variable and retains its own value for the 
> variable, but each subclass has a variable with the same 
> name. Only class methods of a class and its subclasses can 
> refer to class instance variables; instance methods cannot.
> 
> Cheers,
> Lukas

Or to put it simply, classes are objects too, and all objects have instance
variables.

Ramon Leon
http://onsmalltalk.com



More information about the smallwiki mailing list