I am using the following code ...
-(id) initWithVariableName:(NSString*)variableName withComparisonValue:(NSString*)comparisonValue {
// super init
self = [super init];
if (!self) return nil;
// set instance variables
self.mustExist = NO;
self.reverseCondition = NO;
self.regularExpression = NO;
self.variableName = variableName; // generates warning
self.comparisonValue = comparisonValue; // generates warning
return self;
}
which generated the following two warnings ...
- Local declaration of 'variableName' hides instance variable
- Local declaration of 'comparisonValue' hides instance variable
Is there a common or accepted convention for dealing with these warnings?
I understand that it is simply to inform the user that they should specify an instance when referring to the class member, but its annoying.