Is this a bug? (Morph)

Bob Arning arning at charm.net
Fri Oct 12 18:24:52 UTC 2001


On Fri, 12 Oct 2001 10:10:10 -0700 Ross Boylan <RossBoylan at stanfordalumni.org> wrote:
>I noticed the following code in Morph
>
>extent: aPoint
>
>	bounds extent = aPoint ifTrue: [^ self].
>	self changed.
>	bounds _ bounds topLeft extent: aPoint.
>	self layoutChanged.
>	self changed.
>
>
>Are the two self changed's necessary?  Is both layoutChanged and self
>changed necessary?

Ross,

Yes and yes. 

- the first #changed notes that the current bounds may need to be redrawn (especially when the morph gets smaller and something else may become exposed)
- the second #changed notes that the new bounds need to be redrawn
- the #layoutChanged informs other morphs of the size change so that they may conform to the new bounds if desired.

Cheers,
Bob




More information about the Squeak-dev mailing list