• 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
NSArrayController selects inserted NSManagedObject with delay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSArrayController selects inserted NSManagedObject with delay


  • Subject: NSArrayController selects inserted NSManagedObject with delay
  • From: Camille GOUREAU-SUIGNARD <email@hidden>
  • Date: Sun, 14 Jan 2007 11:25:31 +0100

Hi,

I've got a slight problem that I'm tired to bypass.

I often use the insert: method on an arrayController (whose mode is entity, and is set to select inserted objects).
Immediatly after the managedObject has been inserted, I need to alter it (it comes from several places with several different intents, so it can't be managed in awakeFromInsert).
So I try to get a handle on it by using:
[[theArrayController selectedObjects] objectAtIndex: 0]


The problem is that it seems to be a slight delay between the time when I issue the insert: method and the time the new object is selected. So, when, immediatly after the insert, I try to recover the object, there is no selection in my arrayController.

Eache time I have this problem I bypass it by creating a method for the recovering and altering of the object, and call that method after the insertion by a performSelector: withObject: afterDelay.

But it's quite heavy, and I'm quite sure cocoa should be neater than that. I should be missing something.
Could somebody be kind enough to point me where I should look at ?


Many thanks.

Camille GOUREAU

Et mon blog: www.lutin-ludique.com/bradype/


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: NSArrayController selects inserted NSManagedObject with delay
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: Annoying 'parse error before' messages
  • Next by Date: Re: How do I get Lucida Grande italic into my application?
  • Previous by thread: Re: NSFileHandle crashes after a loop completes
  • Next by thread: Re: NSArrayController selects inserted NSManagedObject with delay
  • Index(es):
    • Date
    • Thread