Mantis - tweak
Viewing Issue Advanced Details
54 tweak always 08-04-04 02:14 08-04-04 04:28
riks  
andreas  
normal  
resolved  
fixed  
none    
none  
0000054: Un-hiding Squeak window => event w/ bad key
On a Mac (OS X) I sometimes Apple-H to hide the whole Squeak window.
When I revive it, the Tweak window within has an error notifier in it:
CHandPlayer sendKeyboardEvent: anEvent
    "Send the event to the costume currently holding the focus, or if none to the owner of the hand."
    | keyValue focus context |
    keyValue := anEvent keyValue.
    focus := self keyboardFocus.
    anEvent isKeyDown ifTrue:[
        self pressedKeys at: keyValue put: true.
        context := focus ifNotNil:[focus world].
        context ifNotNil:[context costume pressedKeys at: keyValue put: true].
    ].
    anEvent isKeyUp ifTrue:[
        self pressedKeys at: keyValue put: false.
^^^^^^^^^^^keyValue is -1 *********************************
        context := focus ifNotNil:[focus world].
        context ifNotNil:[context costume pressedKeys at: keyValue put: false].
    ].
    ^self sendEvent: anEvent focus: self keyboardFocus clear:[self keyboardFocus: nil]

anEvent is not readily inspectable: attempting to do so
gives an error of subscript out of bounds.
I have not been able to get similar behavior on Linux

There are no notes attached to this issue.