Mouse/Keyboard event handling -- why does SimpleButtonMorph delay?

John M McIntosh johnmci at smalltalkconsulting.com
Mon Mar 18 22:37:05 UTC 2002


>I've got a problem I'm hoping someone has a quick answer for. If 
>not, I'll dig...
>
>I've got an application that is doing animation through stepping of 
>Morphs. I have some SimpleButtonMorphs that control some stuff.
>
>Here's the problem: if I click a button while animation is going on, 
>the button action doesn't happen until the mouse is moved. The 
>button highlights on mouse down, but it doesn't seem to see the 
>mouse up until I subsequently move the mouse.

Well the VM should give you a
mouse down, *maybe a mouse move*, mouse up

This should come up from EventSensor.

However Morphic then reviews this data and make decisions. You'll 
need to explore the morphic event/stepping logic to understand where 
the mouse up goes or what decision is being made.

See HandMorph>>generateMouseEvent:

Oh and printing to the Transcript usually messing up the timing in this stuff.

-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================



More information about the Squeak-dev mailing list