Re: Forwarding key events to a non first responder?
Re: Forwarding key events to a non first responder?
- Subject: Re: Forwarding key events to a non first responder?
- From: Robert Goldsmith <email@hidden>
- Date: Wed, 12 Jun 2002 10:11:17 +0100
>
The subject line probably doesn't explain my question well
>
enough. Essentially what I'd like to do is have a big
>
NSTableView on a window that may or may not actually be first
>
responder -- perhaps there are some buttons or text fields on
>
the window. I'd like to be able to have keys that are
>
interesting to the NSTableView -- e.g. up/down arrows, page up &
>
page down -- essentially "forwarded" to the NSTableView, even if
>
something else is actually first responder. That would make it
>
much more intuitive for somebody to make use of the window, not
>
having to "tab into" the table (especially useless since there
>
is no highlighting shown when the table is first responder.
Well, if you add the needed methods to the NSTableView class (use
a catagory), then it will be able to respond to the
first-responder messages (such as keypresses, copy, paste etc.).
Then, maybe you could try asking the NSWindow to set your table
as firstResponder directly. After this I'm not sure. You could
try simply passing unknown messages up the responder chain (I
think it's as easy as simply ignoring a message or you can
explicitly generate a new message). The other option would be to
have a component (maybe the tableview) acting as a switchboard
for all the messages, dealing them out to the correct instance. I
highly don't recommend that though!
Robert
---
GnuPG public key:
http://www.Far-Blue.co.uk/RSGoldsmith.asc
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig; charset=US-ASCII]
_______________________________________________
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.