Re: NSArrayController can't removeObject(s) because of missing managed object context
Re: NSArrayController can't removeObject(s) because of missing managed object context
- Subject: Re: NSArrayController can't removeObject(s) because of missing managed object context
- From: Olger Warnier <email@hidden>
- Date: Wed, 25 Jul 2007 20:47:30 +0200
Thanks for your suggestions.
The basic idea is that it is not a core data entity.
So the attributes for the NSArrayController (in the inspector) are
set to Class (not Entity) and as a class name it contains the MyItem
class.
I tried a small idea that may give issues, some member variables of
the MyItem are no objects, but more 'C' type like int / enum.
I found some notes on putting a setNilValueForKey: inside the object
to deal with that.
With this code added, the list is in the emptied, but the exception
is still here (but appears at a later stage)
The TableView (or Column) does not show the items anymore, but I can
still click (non visible rows) them, so that is a bit of strange
behaviour.
One of the TableColumns is bound to a enum (c style), maybe it can't
handle that ?
Any other suggestions ?
Kind Regards,
Olger
On Jul 24, 2007, at 9:49 PM, Jonathon Mah wrote:
Hi Olger,
On 2007-07-25, at 05:15, Olger Warnier wrote:
I try to programatically remove objects inside the
NSArrayController, but this gives an issue:
Exception raised during posting of notification. Ignored.
exception: Cannot perform operation without a managed object context
You have the array controller set up to use Core Data entities. Is
that what you want? Otherwise, turn it off (in Interface Builder).
Jonathon Mah
email@hidden
_______________________________________________
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