home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / msysjour / vol04 / 02b / project / classes / taskdial.cls < prev    next >
Text File  |  1988-11-22  |  1KB  |  45 lines

  1. /* Display and edit the Task information.
  2.    This class descends from class MStoneDialog and
  3.    inherits all of its data and behavior.
  4. */!!
  5.  
  6. inherit(MStoneDialog, #TaskDialog, nil, 2, nil)!!
  7.  
  8. now(TaskDialogClass)!!
  9.  
  10. now(TaskDialog)!!
  11.  
  12. /* Set the values of the activity. */
  13. Def  setValues(self | ues, ulf)
  14. {
  15.   ues := checkDate(getItemText(self, UES));
  16.   ulf := checkDate(getItemText(self, ULF));
  17.   setValues(activity, tuple(
  18.     getItemText(self, NAME),
  19.     getItemText(self, DESC),
  20.     ues,
  21.     ulf,
  22.     asDec(getItemText(self, TIME)),
  23.     asDec(getItemText(self, FC)),
  24.     getItemText(self, RES)));
  25. } !!
  26.  
  27. /* Return the resource ID that should be used with this
  28.    dialog box. */
  29. Def  res(self)
  30. {
  31.   ^TASK_BOX;
  32. }!!
  33.  
  34. /* Initialize the dialog so all fields have the correct values. */
  35. Def initDialog(self, wp, lp)
  36. {
  37.   initDialog(self:MStoneDialog, wp, lp);    /* use ancestor init */
  38.   setItemText(self, TIME, asString(getTime(activity)));
  39.   setItemText(self, FC, asString(getFixedCost(activity)));
  40.   setItemText(self, RES, getResourceNames(activity));
  41.   setItemText(self, COST, asString(getCost(activity)));
  42. }
  43. !!
  44.  
  45.