Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

performKeyEquivalent on NSTextField subclass



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.