NSProgressIndicator needs -display after -setDoubleValue
NSProgressIndicator needs -display after -setDoubleValue
- Subject: NSProgressIndicator needs -display after -setDoubleValue
- From: Jerry Krinock <email@hidden>
- Date: Fri, 12 Oct 2007 21:10:06 -0700
Under normal circumstances; that is, in a small demo project, it is
not necessary to send any kind of 'display' message to an
NSProgressIndicator after updating the progress with -
setDoubleValue. It "just works". But in my real project, where my
progress indicator is programatically created and then added as a
subview to my custom NSControl, the progress stays stuck at 0 unless
I send it a -display after each -setDoubleValue.
The progress is updated by a loop in a function in the main thread,
which blocks the main thread. Yes, I have told it to -
useThreadedAnimation:YES. Many times!! But it does not help.
Of course I don't want to leave -display in my loop, besides the fact
that it's bad engineering, it increases the run time of a typical 2-
second task up to about 10 seconds. And it only works when I apply
the heavyweight, -display. The nicer alternatives, -setNeedsDisplay,
and -setNeedsDisplay:YES, do not work.
I hope someone out there might know a tidbit about
NSProgressIndicator that might help me understand this.
Jerry Krinock
_______________________________________________
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