home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Mops 2.7 / Mops source / Toolbox classes / Alert next >
Encoding:
Text File  |  1994-03-20  |  610 b   |  37 lines  |  [TEXT/MSET]

  1. \ Alert support.
  2.  
  3. type{    STOPALERT  NOTEALERT  CAUTIONALERT  }
  4.  
  5. :class    ALERT    super{ x-array }
  6.  
  7.     int    RESID
  8.     int    TYPE
  9.  
  10. :m SHOW:
  11.     word0  int: resID  0 ( procID )  get: type
  12.     SELECT[        StopAlert        ]=>    call StopAlert
  13.           [        NoteAlert        ]=>    call NoteAlert
  14.           [        CautionAlert    ]=>    call CautionAlert
  15.         DEFAULT=>                    drop  call Alert
  16.     ]SELECT
  17.  
  18.     i->l  dup 0>
  19.     IF    1-  exec: super
  20.     ELSE    drop
  21.     THEN  ;m
  22.  
  23. :m INIT:    \ ( xt1 ... xtN N resID -- )
  24.     put: resID  put: super  ;m
  25.  
  26. :m SETTYPE:
  27.     put: type  ;m
  28.  
  29. :m DISP:    \ ( resID type -- )
  30.     put: type  put: resID  show: self  ;m
  31.  
  32. :m CLASSINIT:
  33.     16  put: type
  34.     classinit: super  ;m
  35.  
  36. ;class
  37.