Screen damage logic
Bob Arning
arning at charm.net
Thu Mar 23 02:52:37 UTC 2000
On Wed, 22 Mar 2000 17:59:57 -0800 "Jim Benson" <jb at speed.net> wrote:
>I'm still confused as to why this degenerates into calling the #drawOn: code
>endlessly. For example, with the round corners on, bring up the menu over
>the XXRM, wander the mouse away from the menu (beeping stops), then rest the
>mouse over the 'world' title. The beeps go nuts. I wouldn't think that you
>need to do this drawing much more than once ( well maybe several times
>depending on how you defined your occlusion region ), yet off it goes.
>Something tells me that it's not quite right.
>
>I'm concerned about this because the World menu is one of the focal points
>of interaction in a Morphic world, and having the menus feel slow detracts
>quite a bit from the overall experience. Plus rounded corners is the default
>menu look for Morphic in a clean image.
Here's the inside story:
All the noise gets generated by this sequence:
MenuItemMorph>>changed
MenuItemMorph>>isSelected:
MenuItemMorph>>deselectForNewMorph:
MenuItemMorph>>mouseMove:
HandMorph>>handleMouseMove:
HandMorph>>handleEvent:
HandMorph>>processEvents
[] in PasteUpMorph>>doOneCycleNow
Array(SequenceableCollection)>>do:
the problem being that MenuItemMorph>>isSelected: sends #changed even if it didn't really change. Here is a fix that seems to correct that:
'From Squeak2.8alpha of 13 January 2000 [latest update: #1919] on 22 March 2000 at 9:49:27 pm'!
!MenuItemMorph methodsFor: 'private' stamp: 'RAA 3/22/2000 21:48'!
isSelected: aBoolean
isSelected == aBoolean ifTrue: [^self].
isSelected _ aBoolean.
self changed.
! !
Cheers,
Bob
More information about the Squeak-dev
mailing list
|