A morphic idea
Raab, Andreas
Andreas.Raab at disney.com
Fri Aug 20 04:52:25 UTC 1999
> Why don't all morphs know how to transform themselves? Could we
> sublcless all morphs that need rotation from Transform morph? Shouldn't
> a morph be able to transform itself without the need of the halo, or
> reparenting ( thus messing up the button calls...)? What would be a good
> way to do this?
>
I actually want to do this for quite some time and it is not *that* hard -
simply add a transformation as an optional property of a morph (e.g., store
it in the otherProperties dictionary to avoid the space overhead) and fix
the methods to be aware of a possible transformation. The latter is the
actual problem - there are *many* subclasses of Morph and it would require
some lots of changes throughout the entire Morphic class hierarchy.
Andreas
--
+===== Andreas Raab ========= (andreasr at wdi.disney.com) ==+
| Walt Disney Imagineering Phone: +1 818 544 5016 I
I Glendale, CA Fax: +1 818 544 4544 I
+======< http://isgwww.cs.uni-magdeburg.de/~raab >========+
> ----------
> From: Daniel Allan Joyce
> Reply To: squeak at cs.uiuc.edu
> Sent: Thursday, August 19, 1999 5:02 PM
> To: 'squeak at cs.uiuc.edu'
> Cc: recipient list not shown
> Subject: A morphic idea
>
> Well, I noticed a bug/design problem in morphic....
>
> If you create a morph, say alignment morph with a clock morph and
> simplebutton morph inside, with the button set up to 'delete' and thuse
> close the alignment morph when done, it works fin...
>
> But if you rotate and scale it, then try to close using the button,
> it
> leaves behind a Transform Morph.
>
> Also, you can't embed a rotated button morph in another in some
> cases.
> If you can, the embedded morph loses its transformation, and assumes
> that of the parent morph...
>
> Looking at the code, when not rotated...
>
>
> button->alignment->world morph.
>
> So the delete action kills the alignment morph, and its children,
> button and clock.
>
> But when rotated,
>
> button->alignment->transformation->world.
>
> So alignment is killed, but transformation morph is left behind,
> cluttering the screen.
>
> Since at creation time, there is no easy way for the button to know
> of
> the transform morph, it will never work correctly when rotated.... It
> seems the rotate button on the halo is reparenting the morphs, and
> inserting the transform morph when needed...
>
> Question then,
> Why don't all morphs know how to transform themselves? Could we
> sublcless all morphs that need rotation from Transform morph? Shouldn't
> a morph be able to transform itself without the need of the halo, or
> reparenting ( thus messing up the button calls...)? What would be a good
> way to do this?
>
> I would like arbitrary, embeddable, local transformations for
> morphs.
>
> I'm willing to work on it too..
>
> Is this a good idea?
>
>
>
> Daniel.
>
More information about the Squeak-dev
mailing list
|