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

Re: NSArrayController selects inserted NSManagedObject with delay


  • Subject: Re: NSArrayController selects inserted NSManagedObject with delay
  • From: Chris Hanson <email@hidden>
  • Date: Sun, 14 Jan 2007 05:30:49 -0800

On Jan 14, 2007, at 2:25 AM, Camille GOUREAU-SUIGNARD wrote:

I often use the insert: method on an arrayController (whose mode is entity, and is set to select inserted objects).

In what situations are you using -[NSArrayController insert:] to create a managed object from within code? Generally, you should only use this as a user interface action; it's declared as an IBAction, and methods that are declared as IBAction are generally intended to manage the whole response to the user themselves; part of this, as you've seen, is that they may need to delay certain things for programmatic purposes even though there will be no perceptible delay to the user.


To create a managed object in your code, use -[NSEntityDescription insertNewObjectForEntityForName: inManagedObjectContext:] instead. This will return the managed object, after invoking its - awakeFromInsert, and you can do further things to it before returning to the user.

  -- Chris

_______________________________________________

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:
    • [SOLVED] NSArrayController selects inserted NSManagedObject with delay
      • From: Camille GOUREAU-SUIGNARD <email@hidden>
    • Swap NSWindow positions with setFrame at the same time
      • From: Chris <email@hidden>
References: 
 >NSArrayController selects inserted NSManagedObject with delay (From: Camille GOUREAU-SUIGNARD <email@hidden>)

  • Prev by Date: Re: How do I get Lucida Grande italic into my application?
  • Next by Date: Re: Is it iCal's memory problem?
  • Previous by thread: NSArrayController selects inserted NSManagedObject with delay
  • Next by thread: Swap NSWindow positions with setFrame at the same time
  • Index(es):
    • Date
    • Thread