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

Doug Way dway at riskmetrics.com
Tue Mar 19 01:17:39 UTC 2002


Martin McClure wrote:
> 
> 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.

I think it's fair to say that there are some significant problems with some of the Morphic event handling right now, such as the mouseMove and mouseUp events.

Some symptoms of the problems:

1. The problem you're seeing with mouseUp in the button.

2. The problem with dragging window titlebars that Jim Benson fixed (http://groups.yahoo.com/group/squeak/message/40805), although his fix was really more of a work-around.

3. A problem that has been bugging me for awhile:  (with fastDragWindowForMorphic turned on) Try opening a dual change sorter window, and as soon as the window appears on the screen, quickly mousedown on the titlebar of the window and drag the window down a few inches, without letting go of the mouse.  After a few seconds the titlebar of the changesorter will lighten (because the window has finished opening), and then you can continue to drag the window (since you didn't let go of the button), but the mouse cursor is a few inches below the title bar of the window that you're dragging!  This problem happens to a lesser extent when I'm just moving windows around normally, but it's most noticeable when opening a new window which takes a while to initialize, such as
a changesorter.

I'm guessing that these are all related problems, but I haven't looked into them too deeply.  (Is the problem that the mouse is polled manually, while other stuff is event driven?)

If someone who knows more about it could give a brief summary of what the current problem is and what possible solutions there are, that would be helpful.

- Doug Way
  dway at riskmetrics.com



More information about the Squeak-dev mailing list