Great! I updated http://code.google.com/p/pharo/issues/detail?id=1323 Adrian On Jan 26, 2010, at 00:26 , John M McIntosh wrote:
Ok, I figured it out, well I think I did.. Mariano is confirming... But I'll post the expected fix in this email.
The problem is related to what InputEventSensor>>processEvent: does.
Normally the expectation is that this method takes the existing event and does some type of post processing. to set state or twiddle the event data, then return the modified event.
However the EventTypeMenu is different and doesn't follow expectations. Instead generates three synthetic keyboard events which are pushed to the queue and returns nil.
Now the problem then is triggered if someone calls InputSensor>>peekEvent with just the right timing to see the menu event on the queue. If that happens from Morph's desired to peek ahead to make decision on mouse movement or keyboard interaction, then the side effect of the peek is to generate a duplicate set of synthetic keystrokes.
The fix is to alter peekEvent so that we ignore for EventTypeMenu
peekEvent "Look ahead at the next event." | nextEvent | nextEvent := eventQueue peek. ^((nextEvent isNil not) and: [(nextEvent at: 1) ~= EventTypeMenu]) ifTrue: [self processEvent: nextEvent]
As for the changes earlier posted, we should run with those. Michael altered them to make the logic cleaner, and I had to change the cmd-key to synthetic key generation to meet expectations based on changes done in the last 5 years.
On 2010-01-25, at 12:14 PM, Stéphane Ducasse wrote:
File in Michael's change first, then mine
-- =========================================================================== John M. McIntosh <johnmci@smalltalkconsulting.com> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ===========================================================================
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project