[Pyobjc-dev] shouldSelectRow not working as expected
Brought to you by:
ronaldoussoren
From: <bo...@pa...> - 2003-02-28 00:52:37
|
well, my tableview_shouldSelectRow is being called, but somehow the return value is getting ingored on the way back to the TableView. here's my delegate code, which hopes to make every other row selectable. it prints the results, but every row in the table is still selectable. changing it to return 0 doesnt help. def tableView_shouldSelectRow_(self, aTableView, rowIndex): print "shouldSelectRow %d is %d" % (rowIndex, rowIndex % 2) return rowIndex % 2 so, i made the same change to TableModel2, and that didn't produce the expected behavior, either. then, i took this sample objC NSTableView code http://www.macdevcenter.com/pub/a/mac/2002/08/27/cocoa.html wired up the controller as a delegate and added - (BOOL)tableView:(NSTableView *)aTableView shouldSelectRow:(int)rowIndex { if (rowIndex % 2) { return YES; } else { return NO; } } and this of course works correctly. any ideas? --bob |