views:

56

answers:

2

Hello,

I am having an issue with a variable being labeled as "out of scope".

The following method can be found in my code:

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

The value of variable named "value" can be seen by the debugger. However, when I assign it to the variable selectedCampaign and continue stepping through the program selectedCampaign becomes out of scope.

Here are selectedCampaign stuff from the .h:

@interface .....{
    NSString *selectedCampaign;
}
@property (retain) NSString *selectedCampaign;
@end

Can anyone tell me what I am doing wrong? Thank you very much!

A: 

Using self.selectedCampaign cleared up the issue... it is now in scope for some reason

Dave C
+1  A: 

You are referring entirely to debug time "in scope" vs. "out of scope" issues and not compile time, right?

If so, the issue is a known bug in the debugger that is fixed in a later release. I'm not sure if the bug fix is in a shipping version of the debugger.

bbum