[vwnc] Problems with Visualworks' shortcut keys on mac osx 10.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Problems with Visualworks' shortcut keys on mac osx 10.

Mathieu van Echtelt-3
Hi all,

I just substituted my windows home computer for a apple mac and have
some troubles getting the shortcut keys in Visualworks behaving like
they did on my windows machine. Maybe it has to do with my lack of mac
experience.

e.g. a shortcut keys for a menu item within the VisualLauncher, as defined like:

<menuItem: '&Do something'
                icon: nil
                nameKey: #doSomething
                enablement: #areAttached
                indication: nil
                shortcutKeyCharacter: $n
                shortcutModifiers: 8
                menu: #(#menuBar  #store #moreRecentlyPublished)
                position: 20.050>


On my windows alt-n activates #doSomething but it doesn't on my mac.

My investigation stopped at:

My investigation stopped at:

MacOSXMenuView >> isMenuItem: aMenuItem
matchForShortcutKeyKeyboardEvent: aKeyboardEvent
        "Answer whether aMenuItem corresponds to the given keyboard event as
short cut key considering the receiver's criteria for matching.
        This needs to be overridden in the appropriate subclasses to
determine the appropriate interpretation of the keyboardEvent."

        | theCharacterOrSymbol |
        theCharacterOrSymbol := aMenuItem shortcutKeyValue.
        theCharacterOrSymbol isNil ifTrue: [^false].
        (aMenuItem shortcutModifierSymbols isSameSequenceAs: aKeyboardEvent
shortcutModifierSymbols) ifFalse: [^false].
        (aKeyboardEvent hasKeyValue: theCharacterOrSymbol) ifTrue: [^true].
        (theCharacterOrSymbol isKindOf: Character) ifFalse: [^false].
        ^(aKeyboardEvent hasKeyValue: theCharacterOrSymbol asLowercase) or:
                [aKeyboardEvent hasKeyValue: theCharacterOrSymbol asUppercase]
...

because "(aKeyboardEvent hasKeyValue: theCharacterOrSymbol)"  returns false.
hasKeyValue is implemented as:

hasKeyValue: testKeyValue
        "Answer whether the receiver represents the specified key value,
which can be a
        Character, Symbol (named special key), or Integer (platform-specific
special key).

        Match against both the normal and alternative key value."

        ^keyCharacter = testKeyValue or: [alternativeKeyCharacter notNil and:
[alternativeKeyCharacter = testKeyValue]]

...

Where I expected it to return true, it returns false because
testKeyValue = $n and  keyCharater = $".

Anybody having a clue?

(Also having problems with shortcuts in workspace/rbbrowser, but
hopefully, an answer to my question above will help me fix the other
problems as well).

thanks in advance,

Mathieu van Echtelt.
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Problems with Visualworks' shortcut keys on mac osx 10.

Alan Knight-2
No, they're just broken :-(

At 08:54 AM 2/21/2009, Mathieu van Echtelt wrote:

>Hi all,
>
>I just substituted my windows home computer for a apple mac and have
>some troubles getting the shortcut keys in Visualworks behaving like
>they did on my windows machine. Maybe it has to do with my lack of mac
>experience.
>
>e.g. a shortcut keys for a menu item within the VisualLauncher, as defined like:
>
><menuItem: '&Do something'
>                icon: nil
>                nameKey: #doSomething
>                enablement: #areAttached
>                indication: nil
>                shortcutKeyCharacter: $n
>                shortcutModifiers: 8
>                menu: #(#menuBar  #store #moreRecentlyPublished)
>                position: 20.050>
>
>
>On my windows alt-n activates #doSomething but it doesn't on my mac.
>
>My investigation stopped at:
>
>My investigation stopped at:
>
>MacOSXMenuView >> isMenuItem: aMenuItem
>matchForShortcutKeyKeyboardEvent: aKeyboardEvent
>        "Answer whether aMenuItem corresponds to the given keyboard event as
>short cut key considering the receiver's criteria for matching.
>        This needs to be overridden in the appropriate subclasses to
>determine the appropriate interpretation of the keyboardEvent."
>
>        | theCharacterOrSymbol |
>        theCharacterOrSymbol := aMenuItem shortcutKeyValue.
>        theCharacterOrSymbol isNil ifTrue: [^false].
>        (aMenuItem shortcutModifierSymbols isSameSequenceAs: aKeyboardEvent
>shortcutModifierSymbols) ifFalse: [^false].
>        (aKeyboardEvent hasKeyValue: theCharacterOrSymbol) ifTrue: [^true].
>        (theCharacterOrSymbol isKindOf: Character) ifFalse: [^false].
>        ^(aKeyboardEvent hasKeyValue: theCharacterOrSymbol asLowercase) or:
>                [aKeyboardEvent hasKeyValue: theCharacterOrSymbol asUppercase]
>...
>
>because "(aKeyboardEvent hasKeyValue: theCharacterOrSymbol)"  returns false.
>hasKeyValue is implemented as:
>
>hasKeyValue: testKeyValue
>        "Answer whether the receiver represents the specified key value,
>which can be a
>        Character, Symbol (named special key), or Integer (platform-specific
>special key).
>
>        Match against both the normal and alternative key value."
>
>        ^keyCharacter = testKeyValue or: [alternativeKeyCharacter notNil and:
>[alternativeKeyCharacter = testKeyValue]]
>
>...
>
>Where I expected it to return true, it returns false because
>testKeyValue = $n and  keyCharater = $".
>
>Anybody having a clue?
>
>(Also having problems with shortcuts in workspace/rbbrowser, but
>hopefully, an answer to my question above will help me fix the other
>problems as well).
>
>thanks in advance,
>
>Mathieu van Echtelt.
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc