2

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.

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
lab12
  • 6,400
  • 21
  • 68
  • 106
  • 5
    This is too generic to answer. See . For example, do you need to be told how to make a new Xcode project? Probably not, but we cannot tell what you do and do not know how to do. – Ken Oct 06 '09 at 22:58

3 Answers3

5

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
  • 26,829
  • 3
  • 55
  • 74
1

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.

1

How would I be able to use a NSLevelIndicator?

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSLevelIndicator_Class/

how would I use a NSProgressIndicator?

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSProgressIndicator_Class/

Peter Hosey
  • 95,783
  • 15
  • 211
  • 370
  • 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) – lab12 Oct 07 '09 at 10:48
  • 1
    `@"2"` is an NSString, not an `int`. – Peter Hosey Oct 07 '09 at 11:05
  • 1
    Pass an `int`. (If you don't know what an `int` looks like, you should buy a book on C.) – Peter Hosey Oct 08 '09 at 00:00