I found what was wrong, mea culpa :( At the very beginning I have some lines to to take over if row == -1 and that intercepted. It works like this:
- (void)tableViewSelectionDidChange:(NSNotification *)notification { NSInteger row = [_tableView selectedRow]; if (row == -1) { //Code if deselected NSLog(@"Deselected: %li",row); //returns always -1 return; } else { //Code if selected NSLog(@"Select row %li: %@",row ,thePathToFile);//returns row number } } Greetings from Switzerland, Ronald Hofmann --- Am 01.04.2014 um 15:25 schrieb Michael Starke <michael.sta...@hicknhack-software.com>: > I can report the same error in my own project. It's a view based table view, > single selection not firing on deselect. > > The table view bound is bound to an NSArrayController for data. > > > On 01 Apr 2014, at 15:11, Keary Suska <cocoa-...@esoteritech.com> wrote: > >> On Mar 31, 2014, at 11:51 PM, Ronald Hofmann wrote: >> >>> I´m using tableViewSelectionDidChange to find out which row of myTableView >>> was clicked. >>> Works fine so far. I´m taking some action than. >>> >>> - (void)tableViewSelectionDidChange:(NSNotification *)notification >>> { >>> NSInteger row = [_tableView selectedRow]; >>> NSLog(@„Row: %il", row); >>> >>> } >>> >>> The problem is that this method is not called when I deselect a row using >>> cmd-click on a row. >> >> This should not be the case. The notification should be posted any time the >> selection changes for any reason. Can you replicate this behavior in a test >> project that you can post? >> >> Best, >> >> Keary Suska >> Esoteritech, Inc. >> "Demystifying technology for your home or business" >> >> >> _______________________________________________ >> >> 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/michael.starke%40hicknhack-software.com >> >> This email sent to michael.sta...@hicknhack-software.com > > > ___m i c h a e l s t a r k e____ > geschäftsführer > HicknHack Software GmbH > www.hicknhack-software.com > > ___k o n t a k t____ > +49 (170) 3686136 > cont...@hicknhack.com > > ___H i c k n H a c k S o f t w a r e G m b H____ > geschäftsführer - maik lathan | andreas reischuck | michael starke > bayreuther straße 32 > 01187 dresden > amtsgericht dresden HRB 30351 > sitz - dresden > > > _______________________________________________ > > 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/prolog%40jumbosoft.de > > This email sent to pro...@jumbosoft.de _______________________________________________ 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