I've got an NSTextField that the user can type a path name into.
When the user hits enter, I set $curr_path and call

  $self->{'Window'}->display();

One of the items that regenerates itself at this point is an
NSTableView.  It calls my numberOfRowsInTableView function,
which notices a change and recalculates the data for the table.
Then, my tableView_objectValueForTableColumn_row hands back the
values for the new version of the table.

All of this is working.  What is not working is that I can't
figure out how to deSelect any row in the TableView that is
selected at the time of the regeneration.  After all, the new
table may have totally different data; why should the same row
stay selected?

My latest attempt looked like:

  # numberOfRowsInTableView - return number of rows
  #
  sub numberOfRowsInTableView {
    my ($self, $tableview) = @_;

    ...

    $curr_path = $default unless (defined($curr_path));
    if (! defined($last_path{'Access'}) or
        $curr_path ne $last_path{'Access'}) {
	...
        $tableview->deSelectAll();
  ...

When I run this, I get the message

  Instances of class NSTableView do not respond to selector deSelectAll

Looking in the CocoaBrowser, I see:

  deselectAll:

  - (void)deselectAll:(id)sender

  Deselects all selected rows or columns if empty selection is allowed,
  otherwise does nothing.  Posts NSTableViewSelectionDidChangeNotification
  to the default notification center if the selection does in fact change.

  As a target-action method, deselectAll: checks with the delegate before
  changing the selection, using selectionShouldChangeInTableView:.

It seems like there should be a "serder" argument, but I dunno what to
use for it.  Help?

-r
--
email: [EMAIL PROTECTED]; phone: +1 650-873-7841
http://www.cfcl.com/rdm    - my home page, resume, etc.
http://www.cfcl.com/Meta   - The FreeBSD Browser, Meta Project, etc.
http://www.ptf.com/dossier - Prime Time Freeware's DOSSIER series
http://www.ptf.com/tdc     - Prime Time Freeware's Darwin Collection

Reply via email to