Re: TableviewSelectionDidChange(_:) not called
Re: TableviewSelectionDidChange(_:) not called
- Subject: Re: TableviewSelectionDidChange(_:) not called
- From: Luc Van Bogaert <email@hidden>
- Date: Tue, 01 Dec 2015 21:15:11 +0100
> On 30 Nov 2015, at 22:57, Quincey Morris <email@hidden> wrote:
>
> On Nov 30, 2015, at 12:18 , Luc Van Bogaert <email@hidden> wrote:
>>
>> I can see this is being called when I make any selection change; except when I delete the (last) selected row. Deleting the second last row does trigger a call, but only when I set the arraycontroller to 'avoid empty selection'.
>
> It sounds like it could be a bug, although I would have thought that anything affecting the data model would make your app revisit whatever it’s doing with the selection anyway. You could try binding the table’s selection row indexes through (that is, through the array controller, if you’re using one) to a data model property, and observe that via KVO.
Thanks,
As I already had an outlet to the ArrayController, I tried to solve this problem by observing its 'selectedObjects' property, which seems to work fine.
I guess that would practically be the same as what you have suggested?
--
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