performKeyEquivalent on NSTextField subclass
performKeyEquivalent on NSTextField subclass
- Subject: performKeyEquivalent on NSTextField subclass
- From: Keith Alperin <email@hidden>
- Date: Fri, 30 Jun 2006 07:07:37 -0500
Greetings Cocoa-devs!
I have a home grown NSTextField subclass that i use to capture hot
keys (meaning that it captures the keycode and modifiers and displays
a human readable string such as "Cmd + Ctrl + A". Unfortunately, it
only works when there is one single instance in my window. All
subsequent instances seem somehow connected to the first, such that
when the second field is focused and i press some keys, the first
field displays the key combination. My key handling mojo is done in
the (BOOL)performKeyEquivalent:(NSEvent *)theEvent method and works
similarly to the way described here (http://www.cocoabuilder.com/
archive/message/cocoa/2006/5/3/162709). By reading that thread, i've
seen that a very respectable group has released some code to do this
for me, but i'd really like to understand what is going on here. I'd
be very grateful to someone for explaining why multiple instances of
my NSTextField subclass behave as if they were 1 instance.
Many thanks,
Keith R. Alperin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden