• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTreeController, NSOutlineView and Core Data (again)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTreeController, NSOutlineView and Core Data (again)


  • Subject: NSTreeController, NSOutlineView and Core Data (again)
  • From: Peter Ferrett <email@hidden>
  • Date: Mon, 2 Mar 2009 19:41:48 +0000


I have Core Data objects bound to an NSOutlineView via a NSTreeController. It is a schema that is common to other threads on this group: one entity for the group, one entity for the leaf, and a with the "children" relationship containing the groups/leafs of the next level. The controller prepares the content. Everything works fine, except that all objects appear at the root level. As observed by others, I need to put a "parent == nil" fetch predicate to prevent all objects appearing at the root level.


However ... with the fetch predicate is in place, the outline view does not get updated until a new group/leaf with the "parent == nil" predicate is inserted. When new leaf objects are inserted, they do not appear in the outline view (until the next time that the an object with the predicate is inserted).

I tried the following: observe NSManagedObjectContextObjectsDidChangeNotification notifications, and call [outlineView reloadItem: parent reloadChildren: YES] when the notifications are received. The debugger indicates that the notifications are being called and the reloadItem:reloadChildren: method is called on the correct object (the parent of the new inserted leaf). However, nothing happens.

Is this one of those methods that is no longer accessible when using bindings? I am not sure what is happening and would welcome suggestions on how to update the outline view to reflect the new objects in the MOC.

thanks in advance

Peter F
_______________________________________________

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


  • Follow-Ups:
    • Re: NSTreeController, NSOutlineView and Core Data (again)
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: enabling Edit menu items in a modal window?
  • Next by Date: Locally Saving Data Acquired by my Cocoa App?
  • Previous by thread: Re: Do I need to relase @"string" ??
  • Next by thread: Re: NSTreeController, NSOutlineView and Core Data (again)
  • Index(es):
    • Date
    • Thread