FROM : Jean-Daniel Dupas
DATE : Sat Apr 19 14:05:00 2008
Le 19 avr. 08 à 06:36, Benjamin Stiglitz a écrit :
>> As previously explained here, I'm handling hotkeys in my app via
>> custom code in order to work around some AppKit bugs.
>>
>> How can I simulate the menu-title blink effect using Cocoa? In
>> Carbon, it's FlashMenuBar(menuID) but I don't see a Cocoa equivalent.
>
> What’s the actual bug? Maybe there is a simpler workaround.
>
> -Ben_______________________________________________
If I understand well, your trying to catch event that match a menu
item shortcut minus the shift key. Isn't it possible to override -
[NSApp sendEvent:] as you did, but instead of taking care of the event
yourself, create a new event that match the menu item and then call
super with this new event ?
- (void)sendEvent:(NSEvent *)theEvent {
if ([theEvent isAnHotkeyEvent]) {
theEvent = [NSEvent eventWithTheKeystrokeAppKitWant];
}
[super sendEvent:theEvent];
}
I really don't know if it works, but it worth the try._______________________________________________
Cocoa-dev mailing list (<email_removed>)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
This email sent to <email_removed>
DATE : Sat Apr 19 14:05:00 2008
Le 19 avr. 08 à 06:36, Benjamin Stiglitz a écrit :
>> As previously explained here, I'm handling hotkeys in my app via
>> custom code in order to work around some AppKit bugs.
>>
>> How can I simulate the menu-title blink effect using Cocoa? In
>> Carbon, it's FlashMenuBar(menuID) but I don't see a Cocoa equivalent.
>
> What’s the actual bug? Maybe there is a simpler workaround.
>
> -Ben_______________________________________________
If I understand well, your trying to catch event that match a menu
item shortcut minus the shift key. Isn't it possible to override -
[NSApp sendEvent:] as you did, but instead of taking care of the event
yourself, create a new event that match the menu item and then call
super with this new event ?
- (void)sendEvent:(NSEvent *)theEvent {
if ([theEvent isAnHotkeyEvent]) {
theEvent = [NSEvent eventWithTheKeystrokeAppKitWant];
}
[super sendEvent:theEvent];
}
I really don't know if it works, but it worth the try._______________________________________________
Cocoa-dev mailing list (<email_removed>)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
This email sent to <email_removed>
| Related mails | Author | Date |
|---|---|---|
| John Stiles | Apr 17, 19:54 | |
| Randall Meadows | Apr 17, 20:01 | |
| John Stiles | Apr 17, 20:05 | |
| John Stiles | Apr 17, 20:14 | |
| Randall Meadows | Apr 17, 20:16 | |
| John Stiles | Apr 18, 20:44 | |
| John Stiles | Apr 18, 23:25 | |
| Martin Wierschin | Apr 19, 04:20 | |
| Martin Wierschin | Apr 19, 04:22 | |
| Benjamin Stiglitz | Apr 19, 06:36 | |
| Jean-Daniel Dupas | Apr 19, 14:05 | |
| Benjamin Stiglitz | Apr 19, 23:42 | |
| John Stiles | Apr 20, 02:36 | |
| John Stiles | Apr 20, 02:37 |






Cocoa mail archive

