home *** CD-ROM | disk | FTP | other *** search
- #import <appkit/appkit.h>
- #import "TargetObject.h"
-
- @implementation TargetObject
-
- - printSelection:sender
- {
- int index;
- // print the class of the sender
- // which should be Matrix
- printf("The class of sender is %s\n",
- [sender name]);
- // get the selected cell and its tag
- index = [[sender selectedCell] tag];
- switch(index)
- {
- case 1:
- printf("Item 1\n");
- break;
- case 2:
- printf("Item 2\n");
- break;
- case 3:
- printf("Item 3\n");
- break;
- }
-
- return self;
- }
-
- @end
-