I want to create a method like this:
- (void) checkAndUpdateStringProperty: (NSString **) property{
if (...)
*property = @\"whatever\";
}
>
If you are really careful about the ownership attributes, you can get around this issue by staring at the following:
[self property]
vs:
self.property
vs:
self->property
Once you are clear about the difference you can try this:
[self checkAndUpdateStringProperty: &self->productName]
Note the use of: ->
I use this all the time when the property attribute is assign and when it is a primitive, non object type: (float, int, ...)