SOLVED: Issues with Core Data, NSTreeController, and observedObject
SOLVED: Issues with Core Data, NSTreeController, and observedObject
- Subject: SOLVED: Issues with Core Data, NSTreeController, and observedObject
- From: Sam Stigler <email@hidden>
- Date: Tue, 8 May 2007 16:52:57 +1000
Hello all,
I am unbelievably ecstatic right now that, after this problem
bugging me for days, I finally figured out how to get [value
observedObject] - type functionality working in a subclass of
NSManagedObject. (Before, neither [value observedObject] nor [value
valueForKey:@"observedObject"] had been working.) Here's the method
I added to my subclass:
-(NSManagedObject *)observedObject {
NSManagedObjectID *objID = [self objectID];
NSManagedObjectContext *moc = [self managedObjectContext];
id tmpObject = [moc objectWithID:objID];
return tmpObject;
}
All of that was just based on a guess from reading the documentation,
and I think I'd seen NSManagedObjectID in one of the NSTreeController
categories out there. Now on to rest of the program...
-Sam
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden