• 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: How refresh window title
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How refresh window title


  • Subject: Re: How refresh window title
  • From: Chris Hanson <email@hidden>
  • Date: Tue, 04 Aug 2009 11:18:13 -0700

On Aug 4, 2009, at 7:51 AM, McLaughlin, Michael P. wrote:

This function is called periodically via the Event Loop.

Are you trying to run your own event loop, and call this method every so often from it to update a progress bar or something, because your application is doing something that takes a while?


If so, then you’re fighting the framework as we say in the Cocoa world. A good indication that you’re doing so is that you’re sending - setViewsNeedDisplay: and -display to an NSWindow.

You should be using an NSOperationQueue or an NSThread to perform your long-running operation. Let Cocoa manage the main run loop (event loop) from the main thread like it normally would. To update your progress window, just just post progress information back to the main thread from your background operations or thread.

  — Chris

_______________________________________________

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: 
 >How refresh window title (From: "McLaughlin, Michael P." <email@hidden>)

  • Prev by Date: Re: [iPhone] networking
  • Next by Date: [iphone] split an image
  • Previous by thread: Re: How refresh window title
  • Next by thread: Re: How refresh window title -- SOLVED
  • Index(es):
    • Date
    • Thread