NSTableView Problems with selectedRow
NSTableView Problems with selectedRow
- Subject: NSTableView Problems with selectedRow
- From: Henry McGilton <email@hidden>
- Date: Wed, 9 Apr 2003 15:54:43 -0700
Well, it looks like NSTableView is one of the all-time least
understood UI objects in Cocoa.
I have a simple three-column NSTableView that displays simple
string data that I maintain in parallel arrays. I have add
row and delete row buttons, which appear to be doing the right
thing. The displaying of the model data appears to work correctly.
And the updating of the model data from data entered via the
NSTableView appears to be doing the correct thing also.
But I am stumped by why selectedRow returns 0 every time, even
when I mouse click on a row and that row is highlighted.
I added the delegate methods shouldSelectRow and
selectionShouldChangeInTableView to both return YES. I can
select any row with the mouse, and it highlights, but when
I push the delete button, selectedRow returns 0 every time,
I will continue experimenting, but these kinds of things
really slow down the development process.
Best Wishes,
........ Henry
===============================+============================
Henry McGilton | Trilithon Software
Boulevardier, Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden |
http://www.trilithon.com
===============================+============================
_______________________________________________
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.