home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Palettes / MiscString / MiscStringInspector.m < prev    next >
Encoding:
Text File  |  1994-01-07  |  695 b   |  35 lines

  1. #import "MiscStringInspector.h"
  2. #import <appkit/appkit.h>
  3. #import <misckit/MiscString.h>
  4.  
  5. @implementation MiscStringInspector
  6.  
  7. - init
  8. {
  9.     char buf[MAXPATHLEN + 1];
  10.     id bundle;
  11.     
  12.     [super init];
  13.     bundle = [NXBundle bundleForClass:[self class]];
  14.     [bundle getPath:buf forResource:"MiscStringInspector" ofType:"nib"];
  15.     [NXApp loadNibFile:buf owner:self withNames:NO fromZone:[self zone]];
  16.     return self;
  17. }
  18.  
  19. - (BOOL)wantsButtons { return YES; }
  20.  
  21. - revert:sender
  22. {
  23.     // Put string in text object
  24.     [stringText setStringValue:[object stringValue]];
  25.     return [super revert:sender];
  26. }
  27.  
  28. - ok:sender
  29. {
  30.     [object setStringValue:[stringText stringValue]];
  31.     return [super ok:sender];
  32. }
  33.  
  34. @end
  35.