Re: receiving key equivalent events
Re: receiving key equivalent events
- Subject: Re: receiving key equivalent events
- From: Brent Gulanowski <email@hidden>
- Date: Mon, 14 Jun 2004 09:53:21 -0400
According to the documentation, the Responder Chain for events only
includes the key window's views and itself -- nothing past that window.
So either you will have to handle the event in the main window (perhaps
by passing it on to the inspector's delegate directly), or add menu
items to the main menu that respond to those command keys. You can keep
the popup menu, but it need not have key equivalents (and if they're
the same they won't register anyway). The menu items in the main menu
can then send their actions to first responder. The action responder
chain includes all windows, their delegates, and the application
delegate, so if your panel's delegate implements actions to enable
changing the inspector view, those messages will eventually arrive and
you can set things up as you like.
Cheers,
On Jun 13, 2004, at 3:59 AM, Chuck Soper wrote:
>
I think the only way to do this is to subclass NSApplication and
>
override:
>
- (void)sendEvent:(NSEvent *)anEvent
>
but this seems like an overkill. Does anyone know the solution to what
>
I've described below?
>
Chuck
>
>
At 12:20 PM -0700 6/12/04, Chuck Soper wrote:
>
> Hello,
>
> I have an inspector window similar to the one in Interface Builder
>
> (IB). It has a NSPopUpButton menu with command key equivalents of 1,
>
> 2, 3, and so on. My inspector window only responds to command key
>
> equivalents when it is front most (this makes sense to me).
>
>
>
> Using command key equivalents, how can I change the current menu item
>
> of inspector window's NSPopUpButton menu when when another window in
>
> front most? The other window is an NSWindowController subclass. I
>
> think that this is a very straightforward question, but I haven't
>
> been able to find the answer. I think that I have to catch the event
>
> in my window controller or perhaps my application delegate then send
>
> a message to the inspector window to select new item in its
>
> NSPopUpButton menu. Any ideas?
>
> Thanks,
>
> Chuck
--
Brent Gulanowski email@hidden
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.