Re: Sheets and NSThread
Re: Sheets and NSThread
- Subject: Re: Sheets and NSThread
- From: Shaun Wexler <email@hidden>
- Date: Thu, 8 Dec 2005 11:32:43 -0800
On Dec 8, 2005, at 9:45 AM, j o a r wrote:
How do you call back from the thread when it's done? You should be
using the "performSelectorOnMainThreadXXX" methods if you aren't
already.
Another suitable way to operate a progress bar is to attach a NSTimer
to the main thread, to read shared data which is updated
asynchronously by the worker thread(s). 1-4 updates per second is
usually sufficient, because NSProgressIndicator runs threaded and
smoothes its value updates using a raised cosine interpolator. There
are several ways to safely manage the shared data [progress %]
between threads without resorting to NSLock or inter-thread messaging/
ports.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
"Problems cannot be solved by the same level of thinking that created
them." - Albert Einstein
_______________________________________________
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