Getting a submorph to spaceFill
Ned Konz
ned at squeakland.org
Thu Mar 25 22:10:59 UTC 2004
On Thursday 25 March 2004 12:54 pm, Lex Spoon wrote:
> Morph>>bounds: calls #extent:, however. It sounds like something else
> is going on.
There are paths through the layout code that don't call #extent:, though, and
instead just assign to bounds directly.
> Your code deals with the *form* size, not the morph size. I was about
> to whine about changing the size of a morph within a drawOn: method,
> which sounds quite unstable. How is Morphic supposed to cope, if a
> morph is asked to draw itself but it changes its size along the way?
> But the code you post is changing the *form* size, not the size of the
> morph. And it is using "self extent" to find the size of the form, thus
> suggesting that the morph is indeed getting set to the correct size.
Right.
> So perhaps the morph was getting resized all along, but it just wasn't
> drawing in its full area?
The morph was getting resized. However, #extent: was not getting called from
the layout method, so the form wasn't getting resized.
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|