Re: Newbie: performSelector: withObject: afterDelay: inModes: question..
Re: Newbie: performSelector: withObject: afterDelay: inModes: question..
- Subject: Re: Newbie: performSelector: withObject: afterDelay: inModes: question..
- From: Carlos Salinas <email@hidden>
- Date: Fri, 8 Jul 2005 23:36:55 -0700
If, for example, the NSModalPanelRunLoopMode is omitted and a modal
panel is displayed (before returning back to the event loop), the
method will be performed after the modal panel is dismissed.
Likewise if NSEventTrackingRunLoopMode is omitted and the user starts
dragging a slider (which is handled in an event tracking mode), the
method will be performed after the user stops dragging the slider.
So it is very important to consider when you a method to be performed
– while modal panels are displayed, while the user is dragging the
mouse, under normal event handling.
On Jul 8, 2005, at 9:45 PM, Scott Andrew wrote:
I have a question about performSelector: withObject: afterDelay:
inModes:. I
understand that this calls the selector after a specific delay.
What exactly
is the modes for. I found some source code that fixes my issue with
text it
is the following:
// Remember that we're in a Modal Panel run loop
[self performSelector: @selector(beginAuthentication)
withObject: nil
afterDelay: 1
inModes: [NSArray arrayWithObjects:
NSDefaultRunLoopMode,
NSModalPanelRunLoopMode, nil]];
What are the modes for?
_______________________________________________
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