• 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
Re: Undo and NSArrayController and CoreData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undo and NSArrayController and CoreData


  • Subject: Re: Undo and NSArrayController and CoreData
  • From: Miguel Sanchez <email@hidden>
  • Date: Thu, 9 Mar 2006 11:32:14 -0800

can you tell us a little more about how it is that you're updating your model? Are you using a proper accessor method (with the will/did calls)? are you removing things from the detail relationship that is represented in the array controller?

your first focus should be not in trying to force the array controller to update, but in seeing if you are changing your model through the official channels so that Key Value Observing can initiatethe correct updates.



- Miguel


On Mar 9, 2006, at 12:49 AM, Jason Swain wrote:

I have a NSArrayController that is bound to the selection of another NSArrayController (don't think this is significant, but just in case). All works fine for user interaction, but when Undo is used, i.e. the Managed Object Model is changed underneath the NSArrayController it does not update correctly.

I have some debug code that gives me a count of the objects in the array, both through the NSArrayController and directly from the CoreData objects. The direct count is correct, and NSArrayController still has the old array of objects (before the undo). So how do I get the NSArrayController to update? I thought that this would happen automatically through the binding, but it does not. I've tried using any methods that looked remotely like they would cause the array controller to reread it's data (-fetch etc), but this does not help.


Jason _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Undo and NSArrayController and CoreData
      • From: Jason Swain <email@hidden>
References: 
 >Undo and NSArrayController and CoreData (From: Jason Swain <email@hidden>)

  • Prev by Date: Category class method problem
  • Next by Date: Re: Category class method problem
  • Previous by thread: Undo and NSArrayController and CoreData
  • Next by thread: Re: Undo and NSArrayController and CoreData
  • Index(es):
    • Date
    • Thread