home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / WebObjects / WebObjectsDoc_HTML / Reuse / ReusableComponentsEx / PageButton.wo / PageButton.wos < prev   
Encoding:
Text File  |  1996-03-09  |  873 b   |  54 lines

  1. //////////////////////////
  2. //  PageButton
  3. //  by Charles Lloyd
  4. //////////////////////////
  5.  
  6.  
  7. //////////////////////////
  8. //  User settable options
  9. //////////////////////////
  10. id pageName;
  11. id buttonImageName;
  12. id buttonImageComponent;
  13.  
  14. //////////////////////////
  15. //  Internal state
  16. //////////////////////////
  17. id currentComponent;
  18.  
  19. - awake
  20. {
  21.     buttonImageName = @"_ButtonPage.gif";
  22. }
  23.  
  24. - pageToDisplay
  25. {
  26.     return [WOApp pageWithName:pageName];
  27. }
  28.  
  29. - setPageToDislpay:aValue
  30. {
  31.     return nil;
  32. }
  33.  
  34. - buttonImageComponent
  35. {
  36.     if (buttonImageComponent) {
  37.     return buttonImageComponent;
  38.     } else {
  39.     return currentComponent;
  40.     }
  41. }
  42.  
  43. - buttonImagePath
  44. {
  45.     id aPath = [NSString stringWithFormat:@"../%@.wo/%@",
  46.     [self buttonImageComponent], buttonImageName];
  47.     return aPath;
  48. }
  49.  
  50. - willPrepareForRequest:aRequest inContext:aContext
  51. {
  52.     currentComponent = [aContext pageName];
  53. }
  54.