> On Jan 4, 2017, at 2:00 PM, cocoa-dev-requ...@lists.apple.com wrote: > > Hi all > I would like to get your experience of using tableViewSelectionDidChange > notification of NSTableView. I have 2 table using in my application. When I > click first table row, it is selected and row shown as blue. When I click > second table row, first table row color becomes gray but still selected. When > I select the same row (selected gray row) in first table, > tableViewSelectionDidChange method is not called because it is the same row. > What is the best way to get still notification to click the same row? Is it > possible to use NSTableView action property using Selector? If so, is there > any side effect of using the NSTableView#action? > func onAction(sender : NSTAbleView){ //This is called irrespective of row > is selected before or not > }
What you have to do is when you get the didselect notification in the one table, you need to unselect from the other table. There are a couple of small issues with this still, and you lose the selection in the first table, if that matters. I'll send you a link to some old code where I had a similar issue. It's ObjC, but should be adaptable to Swift. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com