Toxic Progress Indicator

Here is a sub-class of NSProgressindicator that implements the pie-chart style as seen in Xcode and Mail. This is similar to the spinning progress indicator (formerly the chasing tails indicator) but can be used for those hard to reach stains that need determinate indicators. Heady stuff I know.

As you can see from the following screenshot it is available in large and small varieties: Piecharts

The indicator is quite configurable with many attributes being exposed and available for Cocoa binding (you can change colours and other drawing attributes). The progress indicator also has a “halted” mode, which when entered will cause it to display a user defined icon. This is very useful for those situations where you need a progress indicator to double as a warning icon (admit it, we’ve all been there!).

As mentioned the class is a subclass of NSProgressIndicator and can be used just like that plain, old, boring, non-toxic class. However when you set the indicator to determinate and set the type to spinning you’ll get the new sexy piechart.

The class is completely standalone, a sample application is provided, as is an Interface Builder palette.

Links: Test Application Screenshot Test Application Movie (.mp4). Subversion Repository Pre-built Test Application and Interface Builder Palette


Update: Special thanks to Martian Technologies, makers of the Slingshot file syncing tool for expressing their gratitude by buying me items from my Amazon wishlist.

Update: Chad Welder is also working on a widget just like this based on his cool CTProgressBadge code. I’d let him know by posting a comment to his blog but his captcha isn’t exactly user friendly.

This entry was posted in Default. Bookmark the permalink.
  • Yeah no clue how it will work when accessed via AppleScript. Good luck and let me know what you find.
  • Hi;

    i really like your pie spinny; not sure why Apple doesn't include Mail's pie and other IB features in IB...

    Here's the thing: i'm trying to access your pie after pulling it off the pallette and setting it to spinner / determinate.

    I want to access it in AppleScript though; I'm a beginner so i'm not sure *what* to ask for / a snippet of code perhaps?

    I'm trying: start progress indicator "tpie" of window 1 which works for spinners and progress bars; i guess with the definate nature i need to increment or something (count...progress...finish)

    Foob
  • Point taken. Hopefully the new "pseudo-captcha" I've installed will work better next time around.
  • Well spotted.
  • Ahruman
    “However when you set the indicator to indeterminate and set the type to spinning you’ll get the new sexy piechart.”

    Surely that should say “determinate”?
  • Thanks again, Jon! This is awesome. I think it looks especially nice when the fill and frame colors are the same hue at different intensities.

    And you're 95% of the way toward "NSPeaceProgressIndicator." :)
blog comments powered by Disqus