• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Simulating menu bar blink in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simulating menu bar blink in Cocoa


  • Subject: Re: Simulating menu bar blink in Cocoa
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Sat, 19 Apr 2008 14:05:00 +0200


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@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Simulating menu bar blink in Cocoa
      • From: Benjamin Stiglitz <email@hidden>
References: 
 >Simulating menu bar blink in Cocoa (From: John Stiles <email@hidden>)
 >Re: Simulating menu bar blink in Cocoa (From: Benjamin Stiglitz <email@hidden>)

  • Prev by Date: Re: Capsule-Style Toolbar Controls
  • Next by Date: Delete NSDefaults while running
  • Previous by thread: Re: Simulating menu bar blink in Cocoa
  • Next by thread: Re: Simulating menu bar blink in Cocoa
  • Index(es):
    • Date
    • Thread