home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / WebObjects / WebObjectsDoc_HTML / Reuse / ReusableComponentsEx / ShowSource.wo / ShowSource.wos < prev   
Encoding:
Text File  |  1996-03-12  |  1.2 KB  |  62 lines

  1.  
  2. id componentName;
  3.  
  4. id componentChoices;
  5. id orientationChoices;
  6.  
  7. id selectedComponent;
  8. id selectedOrientation;
  9.  
  10. - awake
  11. {
  12.     componentChoices = @("Example", "Component");
  13.     orientationChoices = @("Rows", "Columns");
  14.     if (!selectedComponent) {
  15.     selectedComponent = @"Example";
  16.     selectedOrientation = @"Rows";
  17.     }
  18. }
  19.  
  20. - sourceAsRows
  21. {
  22.     if ([selectedOrientation isEqualToString:@"Rows"]) {
  23.     return YES;
  24.     }
  25.     return NO;
  26. }
  27.  
  28. - selectedComponentName
  29. {
  30.     if ([selectedComponent isEqualToString:@"Example"]) {
  31.     return [NSString stringWithFormat:@"%@Ex", componentName];
  32.     }
  33.     return componentName;
  34. }
  35.  
  36. - showSource
  37. {
  38.     id aSourceSplitView = [WOApp pageWithName:@"SourceSplitView"];
  39.     [aSourceSplitView setComponentName:[self selectedComponentName]
  40.     sourceAsRows:[self sourceAsRows]];
  41.     return aSourceSplitView;
  42. }
  43.  
  44. //  THIS IS ONLY HERE ON A TEMPORARY BASIS UNTIL AFTER BETA 1.
  45. - defeatDisplay
  46. {
  47.     id aBundle = [NSBundle bundleWithPath:
  48.     @"/NextLibrary/WebObjects/Executables"];
  49.  
  50.     id aPath = [aBundle pathForResource:@"DefaultApp-Beta1" ofType:@""];    
  51.     if (aPath) {
  52.     return nil;    
  53.     }
  54.  
  55.     aPath = [aBundle pathForResource:@"EOFDefaultApp-Beta1" ofType:@""];
  56.     if (aPath) {
  57.     return nil;    
  58.     }
  59.  
  60.     return YES;
  61. }
  62.