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

  1. ////////////////////////
  2. //  MonthChoice
  3. //  by Charles Lloyd
  4. ////////////////////////
  5.  
  6.  
  7. id matrixName;
  8. id selectedMonth;
  9. id selectedMonthInt;
  10. id borderSize;
  11. id cellPadding;
  12. id cellSpacing;
  13.  
  14. id monthChoices1;
  15. id monthChoices2;
  16. id monthChoices3;
  17. id monthTable;
  18.  
  19. - awake
  20. {
  21.     matrixName = @"UserShouldProvide";
  22.     [self setSelectedMonthInt:[[NSCalendarDate date] monthOfYear]];
  23.     borderSize = 1;
  24.  
  25.     monthChoices1 = @("Jan", "Apr", "Jul", "Oct");
  26.     monthChoices2 = @("Feb", "May", "Aug", "Nov");
  27.     monthChoices3 = @("Mar", "Jun", "Sep", "Dec");
  28.  
  29.     monthTable = @("Invalid", "Jan", "Feb", "Mar", "Apr", "May",
  30.                    "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
  31.     cellPadding = 1;
  32.     cellSpacing = 0;
  33. }
  34.  
  35. - setSelectedMonth:aMonthString
  36. {
  37.     selectedMonth = aMonthString;
  38.     selectedMonthInt = [monthTable indexOfObject:aMonthString];
  39. }
  40.  
  41. - setSelectedMonthInt:anInt
  42. {
  43.     selectedMonthInt = anInt;
  44.     selectedMonth = [monthTable objectAtIndex:anInt];
  45. }
  46.