• 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: Keary Suska <email@hidden>
  • Date: Thu, 13 Oct 2011 15:12:22 -0600

On Oct 13, 2011, at 2:20 PM, Richard Somers wrote:

> Consider a NSArrayController in entity mode. When a managed object is inserted into the managed object context the controller's arrangedObjects property is not updated immediately.

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."

> Calling a controller 'fetch:' immediately after inserting the managed object into the managed object context does not help. The controller's arrangedObjects property is still not updated.
>
> Perhaps there is a KVO change notification delay between the time when the managed object is inserted into the managed object context and the time when the controller finds out about the change.

Not in my experience (except as noted above).

> Does anyone have any insight into what is going or how to force the NSArrayController's arrangedObjects property to update?

If the action has been deferred as described above, you are mostly out of luck. You could chance manually turning the runloop but it is fragile and generally recommended against.

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

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

  • Follow-Ups:
    • Re: NSArrayController Update Delay
      • From: Richard Somers <email@hidden>
References: 
 >NSArrayController Update Delay (From: Richard Somers <email@hidden>)

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