Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006600 [Squeak] Morphic minor always 08-09-07 04:52 08-09-07 04:52
Reporter wiz View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version
Summary 0006600: HandMorph>initForEvents sets lastMouseEvent to an incorrect mouse move event
Description In perusing the code I came across this

'tk 8/9/2001 16:55 HandMorph initForEvents {initialization}'

    mouseOverHandler _ nil.
    lastMouseEvent _ MouseEvent new setType: #mouseMove position: 0@0 buttons: 0 hand: self.
    lastEventBuffer _ {1. 0. 0. 0. 0. 0. nil. nil}.
    self resetClickState.
please note that this isn't a proper MouseMoveEvent
something receiving this and asking for mousemove specific info will lose bigtime. And the consequences that deep in the gui. Hmmm.

proposed fix:
    mouseOverHandler := nil.
    "insure we have a modern mouse move"
    lastMouseEvent := (MouseEvent new
                setType: nil
                position: 0 @ 0
                buttons: 0
                hand: self) asMouseMove.
    lastEventBuffer := {1. 0. 0. 0. 0. 0. nil. nil}.
    self resetClickState
Additional Information Thoughts on installing


read in the new method
write tests
patch callers of old method one by one.

big bang
read in the new method
write tests

save under old method name.


Does this cause problems?

the method is called whenever a new project is installed.
new gui events will correct things quickly.

I haven't the foggiest idea how the first lastEvent is used or when it is discarded.

Still I consider it cheap insurance to correct the event format.

And my curiosity would like to see a good probe to answer this question.

My image from time to time quits on me spontaneously. (7137) on an old iMac. Problems may be due to nothing more than age and spiders tripping over the address lines. On the other hand it may not.

I recently found out I could hard crash my system by doing funny things in squeak (see 0006591) and one of the things going on there is a move handler the relies on startpoint being present in a mouse move.

Thus my heightened vigilance.
Attached Files [^] (440 bytes) 08-09-07 04:52

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
08-09-07 04:52 wiz New Issue
08-09-07 04:52 wiz File Added:

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
30 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker