On Thu, Jan 19, 2017 at 11:33 AM, Cyril Ferlicot D. <cyril.ferlicot@gmail.com> wrote:You just need a class variable #UniqueInstance and those methods:
current
�� �� "Can also be named #default or #instance"
�� �� �� �� ^ UniqueInstance
�� �� �� �� �� �� �� �� ifNil: [ UniqueInstance := self basicNew; initialize; yourself ]
Wouldn't a class instance variable be better? I want new singletons for every subclass. http://rmod-pharo-mooc.lille.inria.fr/MOOC/Slides/Week3/ C019-W3S03-Basic-Variables.pdf I would also have used super new, why BasicNew? But my wish to create subclasses seems to answer that already.��Thanks for your find-grained example, Cyril!Siemen