Updating a progress bar from a code loop
Updating a progress bar from a code loop
- Subject: Updating a progress bar from a code loop
- From: Graham Cox <email@hidden>
- Date: Tue, 10 Jun 2008 16:24:19 +1000
Hi all,
I have a lengthy routine that I'd like to show a progress bar for. The
routine runs in a while() loop, and calls a delegate which implements
the progress update. My progress window opens OK but nothing gets
updated, though I know that it's getting the correct values set.
I'm assuming the problem is that because I'm not running the event
loop at this point, updates aren't getting processed. Makes sense I
think.
How do I give some time to the event loop while I'm running my own
loop? I tried:
[[NSRunLoop currentRunLoop] runMode:NSRunLoopCommonModes beforeDate:
[NSDate distantFuture]];
but it didn't fix the problem. Note that I've tried running my window
both modally and non-modally but it's the same either way.
What should I be doing?
tia,
Graham
_______________________________________________
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