home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / RB3641.ZIP / EX1 / TDABTDLG.CLS < prev    next >
Text File  |  1991-12-20  |  1KB  |  55 lines

  1.  
  2. DialogBox subclass: #ToDoAboutDialogBox
  3.   instanceVariableNames: ''
  4.   classVariableNames: 
  5.     'ItemIds '
  6.   poolDictionaries: 
  7.     'PMConstants '    !
  8.  
  9.  
  10. !ToDoAboutDialogBox class methods !
  11.   
  12. initialize
  13.         "Fill the ItemIds dictionary holding
  14.          the ID values of controls in the Dialog Box.
  15.  
  16.          This method must be written by application developer
  17.          in order to provide a link between dialog box
  18.          controls and application methods.
  19.          ItemIds dictionary can be generated 'manually'
  20.          ( like in here ) or by reading the include-file
  21.          (xxx.h) generated by Dialog Box Editor."
  22.  
  23.    ItemIds := Dictionary new.
  24.    ItemIds at: 101 put: #ok.!
  25.   
  26. windowId
  27.         "Answer the dialog id of the AboutDialog."
  28.     ^100! !
  29.  
  30.  
  31.  
  32. !ToDoAboutDialogBox methods !
  33.   
  34. itemIds
  35.     "returns the value of itemIds dictionary"
  36.  
  37.     ^ItemIds!
  38.  
  39. ok
  40.     "Called when the user select OK
  41.      puh button in the dialog box "
  42.  
  43.     ^self close!
  44.  
  45. open
  46.     "Called when user selects About in ToDoWindow.
  47.      Dialog box is loaded from a resource file created
  48.      by the Dialog Box Editor"
  49.  
  50.      self fromResFile: 'ex1\about.res'. 
  51.      "self fromModule: (DynamicLinkLibrary open:'c:\stvpm\todo\dlgdll.dll')    id: self class windowId."
  52.  
  53.      self showWindow.
  54.      self processInput! !
  55.