This is TargetObject.m in view mode; [Download] [Up]
#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
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.