Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000038 [tweak] block always 07-14-04 22:03 08-04-04 04:28
Reporter johnmci View Status public  
Assigned To andreas
Priority normal Resolution fixed  
Status resolved  
Summary 0000038: Use of option -key in tweak browser windows can cause failure
Description Three events are generated, keydown, keychar keyup. In this example the option key generates the unicode 8706 (keyup/keydown) for keychar 182 http://www.alanwood.net/demos/charsetdiffs.html. [^]
On the self pressedKeys at: keyValue put: false. we die because 8706 is evil.

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.
        context := focus ifNotNil:[focus world].
        context ifNotNil:[context costume pressedKeys at: keyValue put: false].
    ].
    ^self sendEvent: anEvent focus: self keyboardFocus clear:[self keyboardFocus: nil]
]
Additional Information Now should
CPrimitiveCostume>>pressedKeys
    self isWorld ifFalse:[^nil].
    ^self propertyValueAt: #pressedKeys ifAbsentPut:[Array new: 256 withAll: false].
 
Become a dictionary? or something else to handle unicode characters correctly?

Also each player get is allocating 256 pointers to true/false to track keyboard state? Would a dictionary save some space (say for 100K players that's 100K of space in the VM eh?). We are only interested in keystate being down, if no entry the default is false
Attached Files

- Relationships

- Notes
(0000027 - 138 - 138 - 138 - 138 - 138 - 138)
johnmci
07-14-04 22:37

I've a change set for this to change things to a dictionary. However I'm not sure how that impacts current work on formal unicode support.
 
(0000028 - 138 - 138 - 138 - 138 - 138 - 138)
johnmci
07-15-04 00:41

I've a change set for this to change things to a dictionary. However I'm not sure how that impacts current work on formal unicode support.
 
(0000033 - 129 - 129 - 129 - 129 - 129 - 129)
andreas
07-21-04 07:42

John -- since I don't have a Mac available right now, how about you fixing this if possible and sending the fix to me? -- Andreas
 

- Issue History
Date Modified Username Field Change
07-14-04 22:03 johnmci New Issue
07-14-04 22:37 johnmci Note Added: 0000027
07-15-04 00:41 johnmci Note Added: 0000028
07-21-04 07:42 andreas Note Added: 0000033
07-21-04 07:42 andreas Status new => feedback
08-04-04 04:28 andreas Status feedback => resolved
08-04-04 04:28 andreas Resolution open => fixed
08-04-04 04:28 andreas Assigned To  => andreas


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