Re: NSRunLoop performSelector question
Re: NSRunLoop performSelector question
- Subject: Re: NSRunLoop performSelector question
- From: Chris Kane <email@hidden>
- Date: Fri, 12 May 2006 07:57:43 -0700
"Ordered performs" (via the method with the order: parameter) only
execute as a result of run loop cycling. They're a way to get things
executed within the run loop cycle, but don't cause the run loop to
cycle. The AppKit uses them to do some things relative to the
drawing update with occurs "at the end of the event cycle", for example.
Perhaps you are looking for the "afterDelay:" variant.
Chris Kane
Cocoa Frameworks, Apple
On May 11, 2006, at 9:22 AM, Craig Hopson wrote:
In my app I use several threads to handle various processing
tasks. The processing starts when a button is clicked and proceeds
until the data is used up. Each of the various threads may finish
their part at a different time, so they signal back to the main
thread via a callback. In the callback I set a flag for each
thread as it calls. When all of the threads have reported in, I call
[ _mainRunLoop performSelector:@selector(myCleanup)
target:self
argument:nil
order:10
modes:
[ NSArray arrayWithObject:NSDefaultRunLoopMode ]];
This works well but for one thing... If I keep hands off the
application - no key events, no mouse clicks, etc. - the selector
is never called (well, I been patient enough to wait 30 seconds).
As soon as I click the mouse, hit a key, etc. the selector is
called. I assume the run loop is waiting for some input to run.
So, how do I trigger this?
Thanks for your help!
Craig Hopson
Red Rock Software
_______________________________________________
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
_______________________________________________
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