Here is how I've tried to link the output to the array, and the warning it generated (line 5, for line 4):
Expand|Select|Wrap|Line Numbers
- -(void)sliderAction:(id)sender{
- NSArray *array = [NSArray arrayWithObjects: @"15", @"15.5", ..., @"45", nil];
- NSString *labelValue; // This var will pass the value to the text label
- labelValue = [array objectAtIndex:slider.value]; // Slider will pass a number from 0-59
- // warning: passing argument 1 of 'objectAtIndex' makes integer from pointer without a cast
- label.text = [NSString stringWithFormat:@"%02.0fmm", labelValue]; // The array number and "mm" will be sent to the text label
- [labelValue release]; // release the memory
- }
Thanks!
Steve