I have an NSTabView with several panes.  I want to know which pane
the user has selected, so that I can force the appropriate update
code to run.  So, I wrote a test function:

sub tabView_didSelectTabViewItem
{
    my ($self, $tv, $tvi) = @_;

    $tab_view_index = $tvi->indexOfTabViewItem();
    NSLog("tab index: $tab_view_index");

    return $self;
}

in MyWindowController.pm and told the NSTabView to use the pm
file as its delegate.  Although the function is being executed
when the tab is clicked, I'm getting a nastygram:

  2003-01-29 02:06:31.693 Morinfo[9284] Instances of class NSTabViewItem
    do not respond to selector indexOfTabViewItem
  2003-01-29 02:06:31.694 Morinfo[9284] tab index: 0

Here are the descriptions, FWIW:

  - (void)tabView: (NSTabView *)tabView didSelectTabViewItem:
    (NSTabViewItem *)tabViewItem

  Informs the delegate that tabView has selected tabViewItem.

  - (int)indexOfTabViewItem:(NSTabViewItem *)tabViewItem

  Returns the index of the item that matches tabViewItem, or NSNotFound
  if the item is not found. A tab view keeps an array containing one tab
  view item for each tab in the view-this is the array that is searched.
  The returned index is base 0.

I'm obviously interpreting something wrong.  Clues, anyone?

-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