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

Re: NSArrayController arrangedObjects KVO


  • Subject: Re: NSArrayController arrangedObjects KVO
  • From: Mike Abdullah <email@hidden>
  • Date: Sat, 12 Apr 2014 22:18:49 +0100

On 12 Apr 2014, at 21:37, Richard Charles <email@hidden> wrote:

> It is well known in some circles that NSArrayController does not correctly populate the KVO change dictionary.
>
> If you manually observe an array controller’s arranged objects key path with the old and new observation options, the change dictionary you will get when an object is inserted will look like the following:
>
> {
>     kind = 1;
>     new = "<null>";
>     old = "<null>";
> }
>
> http://ddeville.me/2013/10/nsarraycontroller-and-kvo-dependent-keys/
>
> Thats fine, I get that. I do not want or need a populated change dicationary. But what I do need is two notifications, one prior to the change and one after the change.
>
> If you manually observe an array controller's arranged objects key path with the prior observation option, you still only get one notification, after the change has been made. The documentation states the prior option should result in a notification sent prior to the change and a notification sent after the change.
>
> Is there any way to receive a before and after notification for the arrangedObjects property?

You could override -rearrangeObjects to post such a notification perhaps.


_______________________________________________

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 arrangedObjects KVO
      • From: Richard Charles <email@hidden>
References: 
 >NSArrayController arrangedObjects KVO (From: Richard Charles <email@hidden>)

  • Prev by Date: NSArrayController arrangedObjects KVO
  • Next by Date: Re: NSArrayController arrangedObjects KVO
  • Previous by thread: NSArrayController arrangedObjects KVO
  • Next by thread: Re: NSArrayController arrangedObjects KVO
  • Index(es):
    • Date
    • Thread