Re: What exactly happens when I use Core Data's 'Remove' button?
Re: What exactly happens when I use Core Data's 'Remove' button?
- Subject: Re: What exactly happens when I use Core Data's 'Remove' button?
- From: "I. Savant" <email@hidden>
- Date: Fri, 11 Aug 2006 09:48:43 -0400
Arthur:
The instance is marked as deleted in the context, but not actually
removed until the context is saved to the store. This is covered in
detail in the Core Data Programming Guide.
Without knowing exactly what you're doing (code???), I can't say
for sure, but you might consider a combination of -[NSManagedObject
isDeleted] and -[NSManagedObject didChangeValueForKey:] to determine
what to do ...
For a better response, send your relevant code (such as your -
awakeFromInsert code).
--
I.S.
On Aug 11, 2006, at 9:32 AM, Arthur C. wrote:
I have a Core Data application where I can add and remove objects
from a table. When I use the 'add' button, a method
'awakeFromInsert' is called, which I can use to set up data
management such as key-value observing.
Is there a similar method that gets called when the 'remove' button
is used? I found that neither the 'dealloc' nor the
'didTurnIntoFault' method gets called. The object-to-be-removed
should at least be unregistered as KVO observer. Failing to do this
leads to strange behaviour: the removed object reappears in the
table view (!) when changing a key this object was observing.
So another question is why the object is not actually deleted (I
would expect it to be dealloc-ed).
Thanks in advance,
Arthur C.
_________________________________________________________________
MSN Search, for accurate results! http://search.msn.nl
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com
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