NSBrowser + Core Data Woes
NSBrowser + Core Data Woes
- Subject: NSBrowser + Core Data Woes
- From: Karl Moskowski <email@hidden>
- Date: Wed, 3 Mar 2010 15:37:41 -0500
I'm manually populating an in-memory CD store with a hierarchy of objects and binding them to a NSBrowser via a NSTreeController. Everything displays fine, but now I'm trying to get at the underlying managed object; I use a custom NSBrowserCell that has a checkbox next to the name, and the MO has a state attribute that corresponds to it.
I've implemented
- (void) browser:(NSBrowser *)sender willDisplayCell:(CleanupBrowserCell *)cell
atRow:(NSInteger)row column:(NSInteger)column;
in my delegate. I have a fetch request in my CD model to get the objects for a given path. However, [sender path] is never found - I'm not sure, but it looks like that's UTF-16 internally, but the MO stores its path as UTF-8 and there's never a match.
I've also tried using the various selection methods in the NSTreeController, but they don't seem to return anything useful.
Once populated, I won't be doing any modifications to the tree of objects. It's just for choosing a number of objects on which to do further work.
Any pointers would be appreciated. Thanks.
----
Karl Moskowski <email@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden