home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / SourceCode / MiscKit1.2.6 / Source / MiscInspectorKit / MiscDefaultInspector.m < prev    next >
Encoding:
Text File  |  1994-03-08  |  1.3 KB  |  58 lines

  1. /* MiscDefaultInspector.m                 
  2.  *
  3.  * This is a class that shows a single view, does no work and registers for
  4.  * every possible trigger inside the popUp.
  5.  *
  6.  * For more interface-info see the header file. In depth information
  7.  * can be found here in the source-code.
  8.  *
  9.  * Written by:         Thomas Engel
  10.  * Created:            09.02.1994 (Copyleft)
  11.  * Last modified:     09.02.1994
  12.  */
  13.  
  14. //#import "MiscDefaultInspector.h"
  15. //#import "MiscInspectorManager.h"
  16. //#import "MiscSwapViewByPopUp.h"
  17. #import <misckit/misckit.h>
  18.  
  19. @implementation MiscDefaultInspector
  20.  
  21. - addWrappedControllers
  22. {
  23.     // Lets get the real swapView and add all our controllers (self is some
  24.     // way). If there is no list of our copies we will create it.
  25.     // This way we will set our swapView....but it has no affect.
  26.  
  27.     id    aController;
  28.     id    popUpList;
  29.     int    i;
  30.     
  31.     swapView = [manager swapView];
  32.  
  33.     if( !controllers )
  34.     {
  35.         popUpList = [[[[swapView popUpCover] target] itemList] cellList];
  36.         controllers = [List new];
  37.         for( i=0; i<[popUpList count]; i++ )
  38.         {
  39.             aController = [self copy];
  40.             [aController setTrigger:[popUpList objectAt:i]];
  41.             [controllers addObject:aController];
  42.         }
  43.     }
  44.         
  45.     for( i=0; i<[controllers count]; i++ )
  46.         [swapView addController:[controllers objectAt:i]];
  47.  
  48.     return self;
  49. }
  50.  
  51. @end
  52.  
  53. /*
  54.  * History: 09.02.1994 First code entered.
  55.  *
  56.  *
  57.  * Bugs: - no read/write;
  58.  */