At 8:51 PM -0500 1/29/03, Dan Sugalski wrote:
have you considered using a delegate instead? Most of the
notifications you can get can be dealt with by registering a
delegate for something.
Yes, that sort of works.  I told IB to delegate from the TableView
to MyWindowController and tried the following test code:

  sub tableViewSelectionDidChange
  {
    my ($self) = @_;

    NSLog('row selected');
    NSLog($self->selectedRow());

    return $self;
  }

The "row selected" message shows up when I click on a row, but then
I see the following:

2003-01-29 18:26:58.313 Morinfo[16919] Perl error: Can't locate object
  method "selectedRow" via package "MyWindowController" at
  .../MyWindowController.pm line 68.

I also tried:

  sub tableViewSelectionDidChange
  {
    my ($self, $aNotification) = @_;


#   NSLog($self->selectedRow($aNotification));
    NSLog($aNotification->selectedRow());
    ...

The last one gave me the nastygram:

  2003-01-29 18:42:35.293 Morinfo[17092] Instances of class
  NSConcreteNotification do not respond to selector selectedRow

I couldn't even find information on NSConcreteNotification...


FWIW, the docs say:

  tableViewSelectionDidChange:

  - (void)tableViewSelectionDidChange:(NSNotification *)aNotification

  Informs the delegate that the NSTableView's selection has changed.
  aNotification is an NSTableViewSelectionDidChangeNotification.


  NSTableViewSelectionDidChangeNotification

  Posted after the NSTableView's selection changes.  The notification
  object is the NSTableView whose selection changed.  The userInfo
  dictionary is nil.

-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