[Cuis] [Ann] Cuis 4.1 is released
Juan Vuletich
juan at jvuletich.org
Mon Dec 17 10:35:41 CST 2012
Chris Muller wrote:
>> Cuis 4.1 is available at http://www.jvuletich.org/Cuis/Index.html . Biggest
>> news is in the Morph hierarchy. Ivars 'bounds' and 'fullBounds' are gone!
>>
>
> Wow! To get rid of those two is amazing; how did you do it?!
>
> Oh, but wouldn't you need at least one of them? How to know a Morphs
> extent now?
>
Hi Chris,
I removed them with a lot of patience. Doing so low level surgery on the
live system is quite risky!
The idea is that location (position, angle, scale, and/or whatever
specification of how a Morph is placed in its owner) should be
completely separated from attributes such as extent. Any morph needs a
location. But not all morphs need an extent. For example, a polyline, or
Bezier path would be specified by corners or control points. Not by
extent. In addition, the location of a morph is a rather accidental
attribute. Moving an object around is not modifying it. Maybe two morphs
with different location can still answer true to #=. But changing size
is indeed a modification. Two morphs with different extent (or control
points or whatever specifies their shape) are indeed different (i.e.
they answer false to #=).
Right now, Cuis doesn't include examples of morphs without extent
(except for Morph itself), as the only morphs that are present are those
needed to support the Smalltalk tools. Because of this, the only
subclass of Morph is RectangleLikeMorph, that happens to use an extent
ivar with the size.
But in Morphic 3, most interesting morphs are not specified by an
extent, but by some set of control points.
BTW, instances of Morph are not resizeable (I had to add an update to
github to avoid a walkback! :) ).
Cheers,
Juan Vuletich
More information about the Cuis
mailing list