views:

42

answers:

0

Hey All,

I have a form that is trying to return a pickerview's value back to another class through an event. The problem is, whenever stepping through this class I keep seeing everything as out of scope... it is weird. When I set a breakpoint on the return value of the pickerview it also says it is out of scope.

@interface Campaign : UIViewController <UIPickerViewDelegate, UIPickerViewDataSource> {
    IBOutlet UIPickerView *pickerView;
    IBOutlet UIButton *select;
    id <CampaignDelegate> delegate;
NSMutableArray *arrayNo;
}

- (IBAction)select:(id)sender;
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component;
@property (nonatomic, retain) NSMutableArray *arrayNo;

- (IBAction)select:(id)sender {
    [self.delegate CampaignComplete:self Picked:[arrayNo objectAtIndex:[pickerView selectedRowInComponent:0]]];
}

- (void)CampaignComplete:(Campaign *)controller Picked:(NSString *)value {
    selectedCampaign = value;
    [Campaign release];
}

When a button is clicked(select above) it checks the array for the value of that pickerview index.

Any help is greatly appreciated.