home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / rxmui / examples / popobject.rexx < prev    next >
OS/2 REXX Batch file  |  1999-12-21  |  2KB  |  71 lines

  1. /**/
  2.  
  3. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  4. if AddLibrary("rxmui.library")~=0 then exit
  5.  
  6. call rxmuiopt("DEBUGMODE SHOWERR")
  7.  
  8. listview.list="list"
  9. listview.frame="inputlist"
  10.  list.0="Zero"
  11.  list.1="One"
  12.  list.2="Two"
  13. res=NewObj("listview","listview")
  14. if res~=0 then call err(res)
  15.  
  16. po.object="listview"
  17. po.string=string("S")
  18. po.button=makeobj("","popbutton",18)
  19. po.toggle=1
  20. res = newobj("popobject","po")
  21. if res~=0 then call err(res)
  22.  
  23. app.Title="PopObject"
  24. app.Version="$VER: PopObject 1.0 (22.11.99)"
  25. app.Copyright="©1999, alfie"
  26. app.Author="alfie"
  27. app.Description="PopObject show"
  28. app.Base="POPO"
  29. app.SubWindow="win"
  30.  win.Title="PopObject"
  31.  win.ID="MAIN"
  32.  win.Contents="mgroup"
  33.   mgroup.0="po"
  34.  
  35. res=NewObj("application","app")
  36. if res~=0 then call err(res)
  37.  
  38. res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  39. if res~=0 then call err(res)
  40.  
  41. res=Notify("LISTVIEW","DOUBLECLICK","EVERYTIME","PO","CLOSE",1)
  42. if res~=0 then call err(res)
  43.  
  44. res=Notify("PO","SUCCESS","EVERYTIME","APP","RETURNID")
  45. if res~=0 then call err(res)
  46.  
  47. res=set("WIN","OPEN",1)
  48. if res~=0 then call err(res)
  49.  
  50. s=0
  51. do forever
  52.     call handle("APP","H",s)
  53.     do i=0 to h.num-1
  54.         if h.i="QUIT" then exit
  55.         if h.i="PO" then do
  56.             call DoMethod("LIST","GETENTRY","ACTIVE","E")
  57.             call set("S","CONTENTS",e)
  58.         end
  59.         say h.num-1 h.i
  60.     end
  61.     s=Wait(or(h.signals,2**12))
  62.     if and(s,2**12)~=0 then exit
  63. end
  64. exit
  65.  
  66. err: procedure expose sigl rxmuierror
  67. parse arg res
  68. say signl "["res"]"
  69.     say getrxmuistring(res) "in line" sigl-1 rxmuierror
  70.     exit
  71.