At 6:54 PM -0800 1/29/03, Rich Morin wrote:
Right, because you get back self as the first parameter to the sub, since it's being done as a method call. The second parameter should be the tableview, so the code would look like: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.
sub tableViewSelectionDidChange {
my ($self, $tableview) = @_;
NSLog("Row selected " . $tableview->selectedRow());
return $self;
}
--
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk
