home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / AlexNeXTSTEPSource / Source / Chapter8_Prefs / PopUp / TargetObject.m < prev   
Encoding:
Text File  |  1993-04-08  |  491 b   |  32 lines

  1. #import <appkit/appkit.h>
  2. #import "TargetObject.h"
  3.  
  4. @implementation TargetObject
  5.  
  6. - printSelection:sender
  7. {
  8.     int index;
  9.     // print the class of the sender
  10.     // which should be Matrix
  11.     printf("The class of sender is %s\n",
  12.         [sender name]);
  13.     // get the selected cell and its tag
  14.     index = [[sender selectedCell] tag];
  15.     switch(index)
  16.         {
  17.         case 1:
  18.             printf("Item 1\n");
  19.             break;
  20.         case 2:
  21.             printf("Item 2\n");
  22.             break;
  23.         case 3:
  24.             printf("Item 3\n");
  25.             break;
  26.         }
  27.         
  28.     return self;
  29. }
  30.  
  31. @end
  32.