Re: performSelector in next run loop?
Re: performSelector in next run loop?
- Subject: Re: performSelector in next run loop?
- From: Pontus Ilbring <email@hidden>
- Date: Sat, 28 Jan 2006 21:14:49 +0100
On 1/28/06, Joshua Scott Emmons <email@hidden> wrote:
> It was suggested yesterday that, to perform a selector in the next
> run loop, one should use -performSelector:withObject:afterDelay:
>
> Is the delay passed to this significant? Or will the selector always
> be called in the next loop regardless of this value?
The delay matters, and other events will be handled during the delay.
> If the delay IS significant, what value should I give it?
If you pass it a delay of 0 I'd expect it to send your message as soon
as possible.
> Or is there something else (performSelector:target:argument:order:modes:?) that
> would work better?
On the other hand, if you're working on the main thread anyway then
performSelectorOnMainThread:withObject:waitUntilDone: can enqueue a
message to be sent in the next iteration of the run loop.
And if you want really fine-grained control then you could use
NSRunLoop's performSelector:target:argument:order:modes:.
_______________________________________________
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