Re: Removing Object form ArrayController without managedObjectContext
Re: Removing Object form ArrayController without managedObjectContext
- Subject: Re: Removing Object form ArrayController without managedObjectContext
- From: Quincey Morris <email@hidden>
- Date: Mon, 29 Mar 2010 14:08:17 -0700
On Mar 29, 2010, at 13:22, Keary Suska wrote:
> On Mar 29, 2010, at 1:43 PM, Gustavo Pizano wrote:
>
>> My guess was that when removing the objects form the array controller ...
>> Now I need to be able to clean the table after saving, otherwise I can't create more items unless I restart the app, or if I clean the table I must restart the app in order to see the newly created invoice's details.
>
> This is a sign of poor design.
I agree. Just to make it explicit:
The OP has mistaken the array controllers for his data model. The Core Data managed object context is the data model, the "M" part of MVC design, and the array controllers are merely glue objects that simplify the "V".
Array controllers aren't really containers, they're proxy objects for containers in the data model, sort of. It makes no sense to talk of "removing the objects from the array controller" as something independent of the data model.
I tried to scare Gustavo off trying to code using the array controllers, in the earlier thread dealing with the problem. Obviously I wasn't scary enough.
_______________________________________________
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