home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 19 / AACD19.BIN / AACD / Programming / rxmui / examples / lm.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-01-29  |  1.7 KB  |  77 lines

  1. /**/
  2.  
  3. call rxmuiopt("debugmode showerr")
  4.  
  5. signal on halt
  6. signal on break_c
  7.  
  8. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  9. if AddLibrary("rxmui.library")~=0 then exit
  10.  
  11. call createApp
  12. call SetNotifies
  13.  
  14. call set("lv","label","Ciao")
  15.  
  16. call set("win","open",1)
  17. call getattr("win","open","o")
  18. if o=0 then do
  19.     say "can't open window"
  20.     exit
  21. end
  22.  
  23. call set("lv","label","Ciao")
  24.  
  25. call handleApp
  26. exit
  27. /***********************************************************************/
  28. handleApp: procedure
  29. ctrl_c=2**12
  30. s=0
  31. do forever
  32.     call handle("APP","H",s)
  33.     do i=0 to h.num-1
  34.         if h.i="QUIT" then exit
  35.         say h.num-1 h.i
  36.     end
  37.     s=Wait(or(h.signals,ctrl_c))
  38.     if and(s,ctrl_c)>0 then exit
  39. end
  40. exit
  41. /***********************************************************************/
  42. err: procedure expose sigl rxmuierror
  43. parse arg res
  44. say sigl "["res"]"
  45.     say getrxmuistring(res) "in line" sigl-1 rxmuierror
  46.     exit
  47. /***********************************************************************/
  48. createApp: procedure
  49.     app.Title="Speedbar"
  50.     app.Version="$VER: Speedbar 1.0 (10.12.99)"
  51.     app.Copyright="©1999, alfie"
  52.     app.Author="alfie"
  53.     app.Description="Speedbar example"
  54.     app.Base="SPEEDBAR"
  55.     app.SubWindow="WIN"
  56.      win.ID="MAIN"
  57.      win.Title="Speedbar Example"
  58.      win.Contents="MGROUP"
  59.       mgroup.0="lv"
  60.         lv.class="levelmeter"
  61.         lv.label="levelmeter"
  62.  
  63.     res=NewObj("APPLICATION","APP")
  64.     if res~=0 then call err(res)
  65.  
  66.     return
  67. /***********************************************************************/
  68. setNotifies: procedure
  69.     res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  70.     if res~=0 then call err(res)
  71.     return
  72. /***********************************************************************/
  73. halt:
  74. break_c:
  75.     exit
  76. /**************************************************************************/
  77.