• 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: First responder after alert
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: First responder after alert


  • Subject: Re: First responder after alert
  • From: Daniel Jalkut <email@hidden>
  • Date: Tue, 28 Jun 2005 09:28:45 -0700

Andy - you might want to put the makeFirstResponder call on an "performSelector:withObject:afterDelay" delay. I've had good luck with that when dealing with responder-related timing issues like this.

Daniel

On Jun 28, 2005, at 8:01 AM, Andy Bettis wrote:

Hi,

 I have an alert displaying function:

- (void)    display
{
    NSRunAlertPanel(mTitle,mMessage,@"OK",nil,nil);

    if (mField) {
        BOOL result = [mWindow makeFirstResponder:mField];
    }
}

Which is intended to set a field on the frontmost window as the first responder after the alert has gone away. However this only works on the second call, the first time I call it the current first responder isn't changed. If I use the debugger to track the processing it all works fine, which makes me think it's a timing/ event/messaging problem. Can anyone suggest a way of setting the first responder effectively?

Many thanks

Rev. Andy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com


This email sent to email@hidden


_______________________________________________ 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
References: 
 >First responder after alert (From: Andy Bettis <email@hidden>)

  • Prev by Date: Re: Open Recent
  • Next by Date: Re: Spotlight bindings example?
  • Previous by thread: First responder after alert
  • Next by thread: [NSPredicate predicateWithFormat:]
  • Index(es):
    • Date
    • Thread