I am building a database migration tool that is a Mac app and I am running into a strange issue making custom getter/setters for a property.
For a property named parentStore
, I have this getter:
- (CCStore *)parentStore {
if (!_parentStore) {
_parentStore = [[CCStore alloc] initWithStoreID:self.storeID];
}
return _parentStore;
}
Pretty straight forward, no issues there.
Now when I try and make a custom setter, Xcode blows up on me.
- (void)setParentStore:(CCStore *)parentStore {
}
I no sooner finish typing the signature on this setter than Xcode claims that the use of _parentStore
up above in the getter is an undeclared identifier. I am running on little sleep so I could just be doing something dumb, but I can not figure it out what is going on!!!
Screen shot shown below: