Re: NSTableView - strange behaviour after cell text color assignment
Re: NSTableView - strange behaviour after cell text color assignment
- Subject: Re: NSTableView - strange behaviour after cell text color assignment
- From: Alexander Bokovikov <email@hidden>
- Date: Tue, 28 Jul 2009 01:51:51 +0600
Replying to myself:
- (void)tableView:(NSTableView *)aTableView
willDisplayCell:(id)aCell
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex;
The function above works perfectly, but the problem reason was in the
incorrect receiving of the selected row index. I wrongly assigned it,
as a global variable, within a function, which updated my table data
on timer. therefore the selected row index value was changed on timer,
but not on real selection change. why didn't 5 set the assignment in
the tableViewSelected: action, going from tableView? Really, I did it.
But unfortunately this action raises on the mouse clicks only.
Keyboard clicks are passing by this action.
Fortunately I've found a solution, that really works. I've registered
an observer for NSTableViewSelectionDidChangeNotification
notification, and now every change of selection is processed.
I believe, the question is closed.
Thanks.
_______________________________________________
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