home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiscKit1.2.6 / Documentation / SwapKitTutorial.rtfd / AtomInspector.m < prev    next >
Encoding:
Text File  |  1994-02-24  |  1.0 KB  |  48 lines

  1. /* AtomInspector.m                 
  2.  *
  3.  * This subclass of MiscInspectorWrapper inspects Atoms.
  4.  *
  5.  * For interface-info see the header file. The comments in this file mostly
  6.  * cover only the real implementation details.
  7.  *
  8.  * Written by:         Thomas Engel
  9.  * Created:            18.12.1993 (Copyleft)
  10.  * Last modified:     08.02.1994
  11.  */
  12.  
  13. #import "AtomInspector.h"
  14. #import "../../Atom.h"
  15.  
  16. @implementation AtomInspector
  17.  
  18. - (BOOL)doesHandleSelection
  19. {
  20.     // If it's a single Atom we will do it and load our NIB if there are
  21.     // no controllers yet.
  22.     
  23.     if( [self selectionCount] == 1 &&
  24.         [[self selection] isMemberOf:[Atom class]] )
  25.     {
  26.         if( !controllers )
  27.         {
  28.             if( [NXApp loadNibSection:"AtomInspector.nib" owner:self] == nil )
  29.                 NXRunAlertPanel( NULL, "Couldn't load AtomInspector.nib",
  30.                                  "OK", NULL, NULL );
  31.         }
  32.         return YES;
  33.     }
  34.     return NO;
  35. }
  36.  
  37. @end
  38.  
  39. /*
  40.  * History: 08.02.94 MiscInspector stuff conform.
  41.  *
  42.  *            08.01.94 Changed to work with our new swapControllers.
  43.  *
  44.  *            18.12.93 My first subclass of InspectorManager
  45.  *
  46.  *
  47.  * Bugs: unknown
  48.  */