NSTable View Selected Cell question
NSTable View Selected Cell question
- Subject: NSTable View Selected Cell question
- From: Bruce Truax <email@hidden>
- Date: Fri, 12 Aug 2005 10:29:18 -0400
I have an NSTableView which displays arranged objects from an NSArray.
After editing a cell in the table it is necessary to update the array. I do
this by observing changes in key paths. This works well except that after I
edit a cell and repopulate the array (and hence the table via bindings) the
highlighted row changes to the first row. This is rather annoying. I would
prefer that the selected cell remain selected but it is not obvious how to
do this. I can retrieve the selected row using [NSTableView selectedRow]
but [NSTableView selectedColumn] always returns -1 so I cannot easily get
the column selected. My questions are:
1. How can I get the indices of the selected cell.
2. After updating my table, how can I reselect the cell determined in 1.
Bruce
--
____________________________________________________________
Bruce E. Truax email: email@hidden
Optical Engineering Consultant
Diffraction Limited Design LLC
388 Wedgewood Road voice: 860-276-0450
Southington, CT 06489 fax: 860-620-9026
http://www.dld-llc.com
_____________________________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden