El mar, 04-08-2009 a las 18:46 +0200, Bert Freudenberg escribió:
On 04.08.2009, at 17:28, Miguel Enrique Cobá Martinez wrote:
What is the difference between a class variable like Current in Locale class:
A class variable exists once per image. A class instance variable exists once per subclass.
If your singleton class has no subclasses, it doesn't matter. If it has subclasses, then each subclass will have a different singleton if you use a class instance variable. With a class variable, you only have one singleton for all subclasses.
Woa, thanks Bert and Hernán, that was a really clear explanation. Now I understand the issues here.
Cheers, Miguel Cobá
- Bert -
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners