• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Spin Progress Indicator is not spinning
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Spin Progress Indicator is not spinning


  • Subject: Re: Spin Progress Indicator is not spinning
  • From: Uli Kusterer <email@hidden>
  • Date: Fri, 7 Nov 2008 01:05:57 +0100

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 (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


References: 
 >Spin Progress Indicator is not spinning (From: "Rashmi Vyshnavi" <email@hidden>)

  • Prev by Date: Re: ObjC data structure for C++/ObjC++ objects?
  • Next by Date: Re: ObjC data structure for C++/ObjC++ objects?
  • Previous by thread: Re: Spin Progress Indicator is not spinning
  • Next by thread: NSPredicateEditor not updating scrollbar
  • Index(es):
    • Date
    • Thread