Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
- Subject: Re: Sorting a TableView in tableView:setObjectValue:forTableColumn:row:
- From: Ondra Cada <email@hidden>
- Date: Sat, 12 Oct 2002 04:44:54 +0200
On Saturday, October 12, 2002, at 04:07 , Andreas Mayer wrote:
I have a table view with sorted rows. When a cell in my key column is
changed, I re-sort my data source and reload the table.
The problem is, that the wrong row (and cell to edit) is selected
afterwards.
Can anyone give ma a hint how to solve this?
Yup -- change the selection accordingly ;)
Changing the selection in tableView:setObjectValue:forTableColumn:row:
does not work.
Doesn't it? Strange... I seem to recall it did for me once or twice with
no problems at all.
Never mind that, it it does not, just postpone it to the end of the event,
like:
-__xx_setSel:(NSNumber*)sel {
[table selectRow:[sel intValue] byExtendingSelection:NO];
}
-tableView:setObjectValue:forTableColumn:row: {
...
[self performSelector:@selector(__xx_setSel:) withObject:newSelRow
afterDelay:0];
}
---
Ondra Hada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.