#initialize and MC

Damien Cassou damien.cassou at laposte.net
Sat Sep 16 20:18:15 UTC 2006


Alejandro F. Reimondo a écrit :
> Damien,
> Please revise why you need to initialize the class...

Each subclass sets a new preference in the preference browser.

Current implementation is in the super class which is abstract:

DPAbstract class>>initialize
   self isAbstract
     ifFalse:
       [Preferences
         addBooleanPreference: self preferenceName
                     category: #'dynamic protocols'
                      default: self defaultPreferenceValue
                  balloonHelp: 'Activates the dymamic protocol ',
                                 self name, '.'].

DPAbstract class>>preferenceName
   ^ self name copyFrom: 3 to: self name size

The preference name is taken from the name of the class without the 
first two characters.

Do you have another solution ?


-- 
Damien Cassou




More information about the Squeak-dev mailing list