Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Main Thread UI and Detached Thread




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Main Thread UI and Detached Thread (From: Mike <email@hidden>)
 >Re: Main Thread UI and Detached Thread (From: j o a r <email@hidden>)
 >Re: Main Thread UI and Detached Thread (From: Mike <email@hidden>)
 >Re: Main Thread UI and Detached Thread (From: j o a r <email@hidden>)
 >Re: Main Thread UI and Detached Thread (From: Mike <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.