Re: Getting an NSManagedObject just added through an NSArrayController
Re: Getting an NSManagedObject just added through an NSArrayController
- Subject: Re: Getting an NSManagedObject just added through an NSArrayController
- From: mmalc crawford <email@hidden>
- Date: Tue, 26 Sep 2006 10:34:19 -0700
On Sep 26, 2006, at 1:23 AM, T. Chataka wrote:
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.
There are numerous ways to achieve this; for example, try newObject
then addObject:
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSObjectController_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObjectController/newObject
>
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSArrayController_Class/Reference/Reference.html#//apple_ref/occ/instm/NSArrayController/addObject:
>
mmalc
_______________________________________________
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