• 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: makeFirstResponder returns NO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: makeFirstResponder returns NO


  • Subject: Re: makeFirstResponder returns NO
  • From: "Adam Gerson" <email@hidden>
  • Date: Wed, 20 Feb 2008 00:38:22 -0500

>
> > - (IBAction)addServerButtonAction:sender {
> >     [serverArrayController add:self];
> >     [window makeFirstResponder:protocolTextField];
> > }
>
> From the NSArrayController class reference for add:
>
> > Special Considerations
> > Beginning with Mac OS X v10.4 the result of this method is deferred
> > until the next iteration of the runloop so that the error
> > presentation mechanism can provide feedback as a sheet.
> >
>
> Presumably your text field won't accept first responder status (or
> perhaps isn't enabled) until there's something in the array controller
> for it to bind to, but that doesn't happen until some time after your
> action method.



Interesting. Thanks. That does explain whats going on. Well, this may be
ugly, but I solved my problem by inserting an non repeating NSTimer to kick
off after I call add: then 0.1 seconds latter it calls makeFirstResponder.
It works!

Adam
_______________________________________________

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

References: 
 >makeFirstResponder returns NO (From: "Adam Gerson" <email@hidden>)
 >Re: makeFirstResponder returns NO (From: Quincey Morris <email@hidden>)

  • Prev by Date: Core Data Validation Ignored?
  • Next by Date: re: Is it possible to override a property in an Entity subclass in CoreData?
  • Previous by thread: Re: makeFirstResponder returns NO
  • Next by thread: NSPopUpButton menu list not showing all the menu items
  • Index(es):
    • Date
    • Thread