Getting an NSManagedObject just added through an NSArrayController
Getting an NSManagedObject just added through an NSArrayController
- Subject: Getting an NSManagedObject just added through an NSArrayController
- From: "T. Chataka" <email@hidden>
- Date: Tue, 26 Sep 2006 17:23:12 +0900
Hi,
I would like to add an NSManagedObject through an NSArrayController
and would like to get the NSManagedObject just added, from the
controller.
I wrote the following code but it doesn't work. The NSManagedObject
returned from the method is not the one just added, but the one selected
by the arrayController before the new one (which I want) is added.
How can I correct the code?
-(NSManagedObject *) addAndGet: (id) sender
{
[arrayController add: sender];
return [[arrayController content] lastObject];
}
Thank you,
Chataka
_______________________________________________
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