• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Main Thread UI and Detached Thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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>)

  • Prev by Date: libpq prepared statement
  • Next by Date: Re: Network notifications
  • Previous by thread: Re: Main Thread UI and Detached Thread
  • Next by thread: Re: Main Thread UI and Detached Thread
  • Index(es):
    • Date
    • Thread