home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / Inspectors / SwapView_2.0r / AppDelegate.m < prev    next >
Encoding:
Text File  |  1992-05-20  |  1.1 KB  |  56 lines

  1. /*
  2.  * Author: Greg Burd, Mr. Average Developer
  3.  *    (I would like to be a member of the NeXT Developer Support Team.)
  4.  *
  5.  * You may freely copy, distribute and reuse the code in this example.  
  6.  * I disclaim any warranty of any kind, expressed or implied, as to 
  7.  * its fitness for any particular use.
  8.  */
  9.  
  10. #import <appkit/Application.h>
  11. #import <appkit/Matrix.h>
  12.  
  13. #import "InspectorController.h"
  14. #import "AppDelegate.h"
  15.  
  16. @implementation AppDelegate
  17.  
  18. /* This helps to make things compile nicely */
  19.  
  20.  
  21. - appDidInit:sender
  22. {
  23.     [self inspectSendersTitle:NULL];
  24.     return self;
  25. }
  26.  
  27. /* this will just make the inspector make key and order front */
  28. - showInspector:sender
  29. {
  30.     if(!myInspector)
  31.         myInspector = [[InspectorController alloc] init];
  32.     [myInspector showInspector];
  33.     return self;
  34. }
  35.  
  36. /*
  37.  * this method is necessary to connect up the command key combinations in IB
  38.  * and let the Application  handle the events..
  39.  */
  40. - inspectSendersTitle:sender
  41. {
  42.     [self showInspector:NULL];
  43.     [myInspector inspectName:(char *)[(id)[sender selectedCell] title]];
  44.     return self;
  45. }
  46.  
  47. /* be a good object and free things nicely */
  48. - free:sender
  49. {
  50.     [myInspector free];
  51.     return self;
  52. }
  53.  
  54.  
  55. @end
  56.