• 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 Update Delay
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController Update Delay


  • Subject: Re: NSArrayController Update Delay
  • From: Richard Somers <email@hidden>
  • Date: Thu, 13 Oct 2011 16:44:41 -0600

On Oct 13, 2011, at 3:12 PM, Keary Suska wrote:

> How is this happening? Via code? or Via the NSArrayController (add: or insert:)? In the latter case the docs say, "Beginning with Mac OS X v10.4 the result of this method is deferred until the next iteration of the runloop so that the error presentation mechanism can provide feedback as a sheet."

I have been inserting objects into the managed object context in code like this.

     [[NSManagedObject alloc] initWithEntity:entity insertIntoManagedObjectContext:moc];

Sometime later the array controller's arrangedObjects property will be automatically updated.

I have not been using NSArrayController's add: or insert: methods because at one time I was using them, in addition to initWithEntity:insertIntoManagedObjectContext:, and I was getting duplicate objects. Although I tried using both of them together just now (first initWithEntity:insertIntoManagedObjectContext: and then add:) and I am not getting any duplicates. So I am a little confused.

Is it normal practice to create a managed object with the designated initializer initWithEntity:insertIntoManagedObjectContext: and also insert the object into the controller using the controller's add: or insert: method?

--Richard

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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

References: 
 >NSArrayController Update Delay (From: Richard Somers <email@hidden>)
 >Re: NSArrayController Update Delay (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Select model objects with NSTableView using cocoa bindings
  • Next by Date: Re: NSArrayController Update Delay
  • Previous by thread: Re: NSArrayController Update Delay
  • Next by thread: Re: NSArrayController Update Delay
  • Index(es):
    • Date
    • Thread