# NSProgressIndicator



## Dogcow (Jan 22, 2003)

I'm attempting to learn Cocoa programming and I've managed to stump myself...
I'm trying to use a ProgressIndicator and can't figure out how to get it to work:

IB won't let me have a button in my program activate the throbber since that button already does something else. So I've created an outlet from my program named "throbber" which is declared in my header file via: "IBOutlet NSProgressIndicator *throbber;" I tried activating it in my code with "[throbber startAnimation];" but when I click it when the program is running the compilers says:


```
2003-01-21 21:12:14.208 Prime Numbers[1463] *** -[NSProgressIndicator startAnimation]: selector not recognized
```

Also one weird thing... Though the spinwheel looks fine in IB, it shows up as a barbar pole when I build in ProjectBuilder. Plus it should be hidden until activated, but in PB it shows up right away. It still doesn't animate...just that error message.

Any suggestions?

Thanks in advance,
- Dogcow "moof!"


----------



## cbaron (Jan 23, 2003)

Do you have an alert while compiling that says :


```
NSProgressIndicator does not respond to -startAnimation:
```

That would mean NSProgressIndicator dosn't have a method called startAnimation. You may look at the class's documentation


----------



## Macwind (Jan 28, 2003)

> _Originally posted by Dogcow _
> *
> ... I tried activating it in my code with "[throbber startAnimation];" but when I click it when the program is running the compilers says:
> 
> ...



  Dude, check startAnimation function syntax:

- (void)startAnimation: (id)sender

so you have to write:

[throbber startAnimation:SENDER];

SENDER is some id...


----------



## kainjow (Jan 31, 2003)

I just use:


```
[throbber startAnimation:nil];
```

using nil as the sender. Works fine for me.


----------



## Macwind (Jan 31, 2003)

> _Originally posted by kainjow _
> *I just use:
> 
> 
> ...



 Sure, but anyway you have to use some parameter, even if nil.


----------

