I want to create a method like this:
- (void) checkAndUpdateStringProperty: (NSString **) property{
if (...)
*property = @"whatever";
}
I want to use this to pass in a property for the same class:
- (void) somewhereElse{
....
[self checkAndUpdateStringProperty: &self.productName];
}
But this gives a syntax error, saying "Address of property expression requested". Any reason why? If I replace the class property with a local variable, it works fine:
- (void) somewhereElse{
NSString *name = nil;
[self checkAndUpdateStringProperty: &name];
}