[FIX] flasherMorphCleaned

Volker Nitsch nitsch-lists at netcologne.de
Wed Apr 17 16:52:09 UTC 2002

ducasse at iam.unibe.ch wrote:
> --==CelesteAttachment89943==
> from preamble:
> "Change Set:		flasherMorphCleaned
> Date:			17 April 2002
> Author:			stephane ducasse
> clean the initialize and initializeToStandalone 
> method. the code of initialize was called two times and may be more. 
> Can somebody check this because I do not know how to validate the
> change. 
> This class is important because this is a simple one that newbies can
> start to look at to understand Squeak and OO

Ah, me. Short, instructive, thanks for the hint :)
Morph initializeToStandAlone "theres a loong class-comment there!"
 self initialize
and FlashMorph its based on
EllipseMorph initializeToStandAlone
	super initializeToStandAlone.
	color _ Color yellow.
(note no initialize here!)
and i like browsing :)

so i think self initialize is not necessary in initializeToStandAlone?
flow goes "recursivly" to Morph, it calles initialize,
then each subclass adds default-values on way back?
hmm, with
: initializeToStandAlone
	super initializeToStandAlone.

i have the red light, drag in in widgets, and can make a lot of them 
seems no need for overriding initializeToStandAlone at all

the code duplication is because of legacy-reasons? :
the standalone should be called by framework,
but fw calls initialize today, ( see Morph doc).
both methods have to do the same work for a while,  
but because initializeToStandAlone calls initialize on its "bottom"
it cannot call it itself, nor the other way.
so this hotfix code-duplication, done with a macro everywhere?


More information about the Squeak-dev mailing list