Re: How refresh window title
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