Re: Main Thread UI and Detached Thread
Re: Main Thread UI and Detached Thread
- Subject: Re: Main Thread UI and Detached Thread
- From: j o a r <email@hidden>
- Date: Mon, 31 Mar 2008 12:47:00 -0700
On Mar 31, 2008, at 12:20 PM, Mike wrote:
I have two methods in the main thread that I call from the worker
using performSelector, etc. The method for updating the progress bar
for example looks like this:
- (void)setProgressBarValue:(double)value
{
if( progressBar )
{
[ progressBar setDoubleValue:value ];
[ progressBar setNeedsDisplay:YES ];
[ progressBar display ];
}
}
Your calls to "-setNeedsDisplay:" and "-display" are basically
mutually exclusive. You should typically not call "-display" directly.
This is a pretty simple app and I don't have time to dive into
performance tools to discover why a single thread in a 10-page app
isn't doing what it's advertised to do.
I don't think you're saving any time by not learning how to use the
performance tools.
j o a r
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden