> > I meant: > > [(MyClassyClass *)obj doSomethingSpecificToMyClassyClass] > > The cast needs to be applied to the pointer - obj - and not to the > returned value (outside the [ ] square brackets). > > -- > I.S.
[Jon C. Munson II] That made a difference. I took your literal word originally. :) After adding @class anEntity; to the .h file (may not be necessary, but did it anyway), and adding #import "anEntity.h" to the .m file, using: [(anEntity *)someObject setAttribute:@"somevalue"]; everything worked just peachy. This uses the dynamic setter for the anEntity class. So, I'll switch from using the KVC calls to the casted calls to take advantage of better efficiency. Thank you, Quincey Morris, for your insight, I appreciate it. I could not, however get this to work (and it may not be possible) with the appropriate @class & #import: (anEntity *)someObject.attribute = @"somevalue"; Is there a way to implement that methodology as well? Correct me if I'm wrong, however, the dot syntax is the same as the dynamic setter, right? To use this methodology, does one then need to use the explicit someObject instead of the generic version: // generic NSManagedObject someObject = [NSEntityDescription insert...]; (anEntity *)someObject.attribute = @"somevalue"; // explicit AnEntity *anEntity = [NSEntityDescription insert...]; anEntity.attribute = @"somevalue"; Thanks I.S.! Peace, Love, and Light, /s/ Jon C. Munson II _______________________________________________ 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