On Oct 16, 2011, at 1:02 AM, Quincey Morris wrote: > On Oct 15, 2011, at 18:02 , Sean Todd wrote: > >> I am trying to convert a Core Data app which uses garbage collection to ARC. >> When I run the refactoring tool, I see issues like: >> >> Semantic Issue: Type of property 'person' does not match type of accessor >> 'setPerson:' > > It's really, really important when asking a question like this to tell us > which line the error message is issued for.
Sorry for the omission. It was for the line of the @property declaration. >> The relevant declaration code: >> >> @class ABPerson; >> >> @interface XG2Student : NSManagedObject { >> } >> >> @property (nonatomic, retain) ABPerson * person; >> >> - (ABPerson *)person; >> - (void)setPerson:(ABPerson *)aPerson; > > I'm guessing that the problem is this totally unnecessary redeclaration of > the property accessors. Just omit the above 2 lines -- they serve no purpose > whatsoever. Thanks. Removing the getter/setter declarations fixed the problem. Still not sure why the error message stated that the type of the property did not match the type of the setter accessor though? >> The relevant implementation: >> >> @implementation XG2Student >> >> @dynamic person; >> >> /* custom getter omitted for brevity */ >> >> - (void)setPerson:(ABPerson *)aPerson { >> >> [self willChangeValueForKey:XG2PersonKey]; >> [self setPrimitivePerson:aPerson]; >> [self didChangeValueForKey:XG2PersonKey]; >> >> self.personUID = [aPerson uniqueId]; // this is the value that is persisted >> } > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com