• 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 - error inserting object at arranged object index N
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController - error inserting object at arranged object index N


  • Subject: Re: NSArrayController - error inserting object at arranged object index N
  • From: Quincey Morris <email@hidden>
  • Date: Thu, 23 Jun 2016 15:03:39 -0700
  • Feedback-id: 167118m:167118agrif8a:167118sqZWfVPZxk:SMTPCORP

On Jun 23, 2016, at 13:39 , Jonathan Mitchell <email@hidden> wrote:
>
> Do you mean something like this?
>
> NSMutableArray *proxy = [NSArrayController mutableArrayValueForKey:@"content"];

That wasn’t what I had in mind. I meant that you would make the array a property of a real model object, and update *that* property, without referring to the array controller directly at all. If you do a KVO compliant update under those circumstances, the array controller will get a KVO notification and update its internal state automatically. You shouldn’t need to re-filter manually.

In theory, that allows the array controller to optimize what it does with the update. If you just add one object, it shouldn’t need to rescan everything in the array, or apply the filter predicate to anything except the object you added. (Caveat: it’s a black box, so we don’t know what it does, but we HOPE that it does this efficiently.)

_______________________________________________

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 - error inserting object at arranged object index N
      • From: Jonathan Mitchell <email@hidden>
References: 
 >NSArrayController - error inserting object at arranged object index N (From: Jonathan Mitchell <email@hidden>)
 >Re: NSArrayController - error inserting object at arranged object index N (From: Jonathan Mitchell <email@hidden>)
 >Re: NSArrayController - error inserting object at arranged object index N (From: Quincey Morris <email@hidden>)
 >Re: NSArrayController - error inserting object at arranged object index N (From: Jonathan Mitchell <email@hidden>)

  • Prev by Date: Re: unnamed function586 $$ AMDRadeon X4000GLDriver
  • Next by Date: NSService (aka. Bonjour) outside local network
  • Previous by thread: Re: NSArrayController - error inserting object at arranged object index N
  • Next by thread: Re: NSArrayController - error inserting object at arranged object index N
  • Index(es):
    • Date
    • Thread