Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Make circular progress indicator move

Hello,


I am trying to make a Circular Progress Bar move while my app is completing a task. My app is a Cocoa-AppleScript Mac app made in Xcode. How can I do this??? Thank You.

Mac mini, OS X Mountain Lion (10.8.3)

Posted on Sep 14, 2013 12:06 PM

Reply
Question marked as Best reply

Posted on Sep 14, 2013 12:21 PM

The things that a progress indicator can do are documented in the NSProgressIndicator Class Reference, for example (assuming yourProgressBar is the property name and it has been properly connected to the progress indicator):


yourProgressBar's startAnimation()


EDIT

I also use an indeterminate progress indicator in my Timers and Progress example project if you downloaded that from a previous topic.

8 replies
Question marked as Best reply

Sep 14, 2013 12:21 PM in response to AppleMan001

The things that a progress indicator can do are documented in the NSProgressIndicator Class Reference, for example (assuming yourProgressBar is the property name and it has been properly connected to the progress indicator):


yourProgressBar's startAnimation()


EDIT

I also use an indeterminate progress indicator in my Timers and Progress example project if you downloaded that from a previous topic.

Sep 14, 2013 1:46 PM in response to AppleMan001

Setting up an outlet property will be the same for any object - just create a property set to missing value, for example:


propertyyourProgressBar : missing value


Properties with this signature will show up in the Interface Editor, where you can make a connection to the UI object. For example, from the Connections Inspector for the App Delegate, all of the outlet properties are listed, so it is easy to just drag a connection from there to the desired object.


After an outlet property has been created and connected, it will represent the class and instance of the object, so you can use the various methods of it and its parent classes (all of the following are equivalent):


yourProgressBar's startAnimation_(me)

startAnimation_(me) ofyourProgressBar

tellyourProgressBartostartAnimation_(me)

Sep 14, 2013 9:44 PM in response to AppleMan001

There is all kinds of information about Xcode in the built-in (and on-line) documentation, for example Manage Connections Between User Interface Objects. The examples use Objective-C, but the basic ideas also apply to AppleScriptObjC.


I've put together a screen recording of connecting an IB outlet and action to an indeterminate progress indicator (spinner) and a button to control it - it can be downloaded here.

Make circular progress indicator move

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.