• 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
Re: Next Key View doesn't "go to" pushbutton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Next Key View doesn't "go to" pushbutton


  • Subject: Re: Next Key View doesn't "go to" pushbutton
  • From: Randy Bradley <email@hidden>
  • Date: Tue, 07 Oct 2008 14:26:41 -0500
  • Thread-topic: Next Key View doesn't "go to" pushbutton

You could override the controlTextDidEndEditing method:


- (void)controlTextDidEndEditing:(NSNotification *)aNotification{
    ...
    if([[[aNotification userInfo] valueForKey:@"NSTextMovement"] intValue]
         == NSReturnTextMovement) {
        //  invoke whatever button pressed code.
        }
    }

This can be advantageous if you allow empty fields.  The user can use the
enter key while the cursor is in any field instead of tabbing all the way to
the button.

You can also check for "NSTabTextMovement" or "NSBacktabTextMovement" if you
want to do any processing between fields.



On 10/07/08 2:02 PM, "email@hidden"
<email@hidden> wrote:

> Next Key View doesn't "go to" pushbutton


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: NSWindowController retain counts, chapter 2
  • Next by Date: Re: Parsing integers from strings
  • Previous by thread: Re: Next Key View doesn't "go to" pushbutton
  • Next by thread: File's owner as target of button-action
  • Index(es):
    • Date
    • Thread