home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / RB3641.ZIP / EX2 / TODOPRI.ST < prev    next >
Text File  |  1991-12-17  |  1KB  |  41 lines

  1.        Exercise 2 - solutions
  2.  
  3.         ToDoPriorityList ( * This is the step by step instruction file ** )
  4.  
  5.         In Class Hierarchy Browser select  the class 'Dictionary' and
  6.         select 'Add Subclass' in  'Classes' menu.
  7.        Write the name of the class (ToDoPriorityList)  in the entry field. 
  8.        This class does not have its instance variable.
  9.  
  10.         This class gives the associations between the priority and the
  11.         assigned values. For example,
  12.               
  13.                     number          priority
  14.                          1                'High'
  15.                          2                'Med'
  16.                          3                'Low'
  17.  
  18.  
  19.         A method is required to set as above.
  20.         To install the 'init' method, evaluate with Do It:
  21.  
  22.           (File pathName: 'ex2\init.mth') fileIn; close.
  23.  
  24.  
  25.         This 'init' is a class method. So it is used like the following
  26.         experessions. Evaluate with ShowIt:
  27.  
  28.        | toDoPriorityList |
  29.          toDoPriorityList := ToDoPriorityList new class init.
  30.          toDoPriorityList keyAtValue: 1.
  31.  
  32.         To install 'ToDoPriorityList' class, evaluate with Do It:
  33.  
  34.           (File pathName: 'ex2\todoPri.cls') fileIn; close.
  35.  
  36.  
  37.  
  38.           ****** END OF EXERCISE ****** 
  39.  
  40.  
  41.