• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting an NSManagedObject just added through an NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Getting an NSManagedObject just added through an NSArrayController
      • From: mmalc crawford <email@hidden>
  • Prev by Date: Re: Tracing Cocoa Functions
  • Next by Date: Re: Connect to two network interfaces simultaneously?
  • Previous by thread: Re: Localizable.strings in frameworks?
  • Next by thread: Re: Getting an NSManagedObject just added through an NSArrayController
  • Index(es):
    • Date
    • Thread