Re: NSProgressIndicator updating
Re: NSProgressIndicator updating
- Subject: Re: NSProgressIndicator updating
- From: Zach Wily <email@hidden>
- Date: Wed, 9 Mar 2005 18:17:52 -0700
I have a window with a progress bar in it that only appears when there
is
activity. Activity is generally swift to complete, but not always.
When an
operation begins, I show the bar, and increment it while the operation
progresses. At the end, I ensure the progress current value and max
value
are set to match. Then I re-hide the progress bar.
Ideally, I'd like the user to see the progress bar full for at least a
split
second, but the internal Cocoa thread mechanism that actually does the
progress bar drawing never quite catches up before the progress bar is
hidden. So, the user sees a progress bar with a small portion filled,
then
it disappears.
Calling [myProgress display] has little or no effect.
How can I force the Cocoa drawing thread to update the display
immediately?
Any ideas?
You could try putting your call to [myProgress setHidden:YES] in
another method, and call that delayed with
[self performSelector:@selector(hideProgressBar:) withObject:myProgress
afterDelay:0.1];
Then the progress bar thread would have a chance to update and draw
before you tell it to hide itself.
zach
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden