• 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
performKeyEquivalent on NSTextField subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Clearing the key event
  • Next by Date: flipping between tabs in tab view
  • Previous by thread: Re: Clearing the key event
  • Next by thread: flipping between tabs in tab view
  • Index(es):
    • Date
    • Thread