[Cuis] A bit of explanation about Morph >> bounds
Ken Dickey
Ken.Dickey at whidbey.com
Sun Dec 22 15:46:15 CST 2013
On Sun, 22 Dec 2013 14:41:26 -0200
Germán Arduino <garduino at gmail.com> wrote:
> Hi People:
>
> I'm playing with some Morph packages that I would like to port to Cuis.
>
> I managed to understand several differences between Morphic of Cuis and
> Morphic of Squeak, but I'm a bit disoriented with #bounds that is an
> instvar very used in Squeak and return a rectangle with the corners of the
> morph.
>
> How I should replace this method in a proper way in Cuis?
In Cuis, the morph's origin is relative to itself so the topLeft corner is always 0 at 0.
I would suggest:
0 at 0 extent: self morphExtent
This is, by the way, the default code in Morph>>layoutBounds, but layoutBounds is overridden in various subclasses so is not a substitute for bounds.
Cheers,
-KenD
More information about the Cuis
mailing list