[Q][BUG] Why rotated morph change class ?
Lic. Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Thu Sep 2 09:59:36 UTC 2004
I doing Squeak teaching to student's of my class.
They are about 20 years old and see something OOP and Smalltalk before using
Smalltalk Express as part of his curricula.
When I show Squeak to them in lab , I took a EllipseMorph from flaps,
duplicate several times , changing color via halo and to one of ellipses I
do rotate via halo too.
I open a Workspace and type:
World submorphs do: [ :m| (m isKindOf: EllipseMorph ) ifTrue: [ m delete ].
Guess what:
The rotate one don't delete. I know what should be originate a
TransformationMorph , so I pick again via halo and raise a inspector.
Surprise!! The inspectors says what still is a EllipseMorph.
Then I subclass Trash can and intercept dropping whit a self halt.
Now I see what morph dropped was TransformationMorph.
They says to me what this is "lack of consistency" and " a real object don't
should change class by the fact you rotate it"
And how I don't have clever answers ,here I asking to list what to say.
Edgar
More information about the Squeak-dev
mailing list
|