Re: Observing NSArrayController selection property
Re: Observing NSArrayController selection property
- Subject: Re: Observing NSArrayController selection property
- From: Lee Ann Rucker <email@hidden>
- Date: Mon, 07 Jul 2014 17:01:12 -0700 (PDT)
- Thread-topic: Observing NSArrayController selection property
Do you have "selects inserted objects" enabled? It's on by default in the nib.
----- Original Message -----
From: "Luc Van Bogaert" <email@hidden>
To: "Cocoa Dev List" <email@hidden>
Sent: Monday, July 7, 2014 1:42:10 PM
Subject: Observing NSArrayController selection property
Hello All,
I'm observing the "selection" property of a NSArrayController object so I can redraw a custom view whenever the selection of the controllers' objects changes. This seems to work fine, except that I also receive messages for the "selection" keypath when sending addObject: or removeObject: to the controller.
The same happens when observing other keypaths like "selectedObjects" or "selectedObjects.count".
As a result I'm redrawing my custom view time many times when it's not required.
Is there a way to avoid this?
Thank you,
--
Luc Van Bogaert
_______________________________________________
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
_______________________________________________
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