On 04.11.2008, at 03:39, Rashmi Vyshnavi wrote:
I am setting a custom view containing a label and spin style progress
indicator. I want the progress indicator to spin when the menu is popped up (similar to AirPort Menu). The progess indicator does not spin though I call startAnimation on it. When I change the style to bar the progress indicator shows progress. Does any one know how get NSProgressIndicator (Spin style)
to spin in Menu..


Haven't tried this, but a lot of animation is done using timers. Timers have to be scheduled using in a particular run loop mode. I guess while a menu is open, the run loop mode is the tracking run loop mode.

Maybe you could schedule your own timer for the tracking run loop mode that calls animate: ?

Alternately, I think NSProgressIndicator can be set to use a thread for its animation. That should fire even in tracking run loop mode. But be careful, threaded animation (like pulsing default buttons or spinners) inside a custom view can cause your custom view to be redrawn from a non-main thread. You'll have to make sure that your custom view is thread-safe, or you'll get very subtle threading bugs.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de





_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to