On Friday, January 31, 2003, at 12:20 AM, Rich Morin wrote:

        $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
Cocoa is case-sensitive - there's a difference between "deSelectAll()" and "deselectAll()".

It seems like there should be a "serder" argument, but I dunno what to
use for it.  Help?
Yes, there should be. When an action method is called in response to some GUI event - a button click, etc. - the "sender" argument is a reference to the object that triggered the event.

You can pass nil - i.e. undef - for "sender" if you want, as in this case "sender" isn't used anyway. But you *do* need to pass it *something*. As I said earlier, Cocoa is not as flexible as Perl in that regard - if a method is declared as receiving four arguments, that means you must pass it four arguments, no more or less.

sherm--

Welcome to Rivendell, Mr. Anderson.

Reply via email to