home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / WebObjects / WebObjectsDoc_HTML / Reuse / ReusableComponentsEx / ArrayEditorEx.wo / ArrayEditorEx.wos < prev   
Encoding:
Text File  |  1996-02-29  |  862 b   |  45 lines

  1. ////////////////////////
  2. //  ArrayEditorEx
  3. //  by Charles Lloyd
  4. ////////////////////////
  5.  
  6. //////////////////////////
  7. // User Settable Items
  8. //////////////////////////
  9. persistent id localArray;
  10.  
  11. //////////////////////
  12. //    Internal State
  13. //////////////////////
  14. persistent id isEditable;
  15. persistent id cellPadding;
  16. persistent id editableString;
  17.  
  18. - awake
  19. {
  20.     if (!localArray) {
  21.         localArray = @("Local 1", "Local 2", "Local 3", "Local 4");
  22.         localArray = [[localArray mutableCopy] autorelease];
  23.         isEditable = NO;
  24.         [self toggleEditable];
  25.     }
  26. }
  27.  
  28. - processForm
  29. {
  30.     return self;
  31. }
  32.  
  33. - toggleEditable
  34. {
  35.     if (isEditable == YES) {
  36.         isEditable = NO;
  37.         editableString = @"Make Editable";
  38.         cellPadding = 4;
  39.     } else {
  40.         isEditable = YES;
  41.         editableString = @"Make Read Only";
  42.         cellPadding = 0;
  43.     }
  44. }
  45.