tags:

views:

318

answers:

3

Hey all,

How would I be able to use a NSLevelIndicator? I am very new to this so, I don't know much on how to use a progress bar for my application.

Thanks,

kEvIn

+4  A: 

You wouldn't use NSLevelIndicator for a progress bar. Check out NSProgressIndicator instead. It does both progress bars and "spinner" controls. NSLevelIndicator is used, for example, to show how full a disk is, or how much battery life is left in your wireless mouse.

Alex
ok so how would I use a NSProgressIndicator?
Kevin
+1  A: 

You don't explain your level of experience. Assuming you have a window already created in Interface Builder, drag an NSLevelIndicator onto the window, create an outlet to it in your application, and set its value as needed. If you don't understand any of that, follow Apple's standard beginners' tutorial and start from there.

Preston
A: 

How would I be able to use a NSLevelIndicator?

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSLevelIndicator%5FClass/

how would I use a NSProgressIndicator?

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSProgressIndicator%5FClass/

Peter Hosey
Ok, I'm just confused on how to set the coding for a NSLevelIndicator.I have [levelIndicator setIntValue:@"2"];I know there must be something wrong, but I want to set the level indicator to where it is 2 (green)
Kevin
`@"2"` is an NSString, not an `int`.
Peter Hosey
Ok so how would I fix this?
Kevin
Pass an `int`. (If you don't know what an `int` looks like, you should buy a book on C.)
Peter Hosey