• 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
Handling NSTextField keyboard events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling NSTextField keyboard events


  • Subject: Handling NSTextField keyboard events
  • From: William LeFevre <email@hidden>
  • Date: Sun, 30 May 2004 23:37:45 -0700

Hello,
I'm creating a small application for calculating monthly mortgage payments. The application uses a number of NSTextFields, all of which are used to input numerical values. The default behavior for the up and down arrows is to move the insertion point to the beginning and end of the current string. I would like to override this behavior to instead increment and decrement the value.
I'm at loss. I can't find a delegate which looks appropriate. Subclassing NSTextField and overriding keyDown: doesn't work because the text field isn't the first responder. My current suspicion is that I need to create a custom field editor which looks like a scary proposition.
Can anyone point me in the right direction?

Thanks,
William
_______________________________________________
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.


  • Follow-Ups:
    • Re: Handling NSTextField keyboard events
      • From: Yann Bizeul <email@hidden>
  • Prev by Date: Subclass NSApplication in Carbon App?
  • Next by Date: Determinating iChat status
  • Previous by thread: Re: Subclass NSApplication in Carbon App?
  • Next by thread: Re: Handling NSTextField keyboard events
  • Index(es):
    • Date
    • Thread