home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 109 / EnigmaAmiga109CD.iso / software / sviluppo / rxmui / examples / vl.rexx < prev    next >
OS/2 REXX Batch file  |  1999-12-21  |  2KB  |  78 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="voll"
  9. voll.class="volumelist"
  10. voll.directory=programname("PATH")
  11. listview.weight=1000
  12. listview.frame="READLIST"
  13. res=NewObj("LISTVIEW","LISTVIEW")
  14. if res~=0 then call err(res)
  15.  
  16. app.Title="kod"
  17. app.Version="$VER: kod 1.0 (22.11.99)"
  18. app.Copyright="©1999, koksa"
  19. app.Author="kkoksa phd"
  20. app.Description="kodda da worlda"
  21. app.Base="LOV"
  22. app.SubWindow="WIN"
  23.  win.Title="Title"
  24.  win.Contents="MGROUP"
  25.   mgroup.0="LISTVIEW"
  26.   mgroup.1=String("DIR",,Programname("PATH"))
  27.   mgroup.4=hvspace()
  28.  
  29. res=NewObj("APPLICATION","APP")
  30. if res~=0 then call err(res)
  31.  
  32. res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
  33. if res~=0 then call err(res)
  34.  
  35. res=Notify("LISTVIEW","DOUBLECLICK","EVERYTIME","APP","RETURNID")
  36. if res~=0 then call err(res)
  37.  
  38. res=set("WIN","OPEN",1)
  39. if res~=0 then call err(res)
  40.  
  41. s=0
  42. do forever
  43.     call handle("APP","H",s)
  44.     do i=0 to h.num-1
  45.         if h.i="QUIT" then exit
  46.         if h.i="LISTVIEW" then do
  47.             res=DoMethod("voll","GETENTRY","ACTIVE","A")
  48.             if res~=0 then call err(res)
  49.             say a.name a.entrytype pragma("D")
  50.         end
  51.     end
  52.     s=Wait(or(h.signals,2**12))
  53.     if and(s,2**12)~=0 then exit
  54. end
  55. exit
  56.  
  57. err: procedure expose sigl
  58. parse arg res
  59.     say getrxmuistring(res) "in line" sigl-1
  60.     exit
  61.  
  62. makeToggle: procedure
  63. parse arg name,text,state,cc
  64.     return ToggleButton(name,text,state)
  65.     b.Contents=text
  66.     b.inputmode="TOGGLE"
  67.     b.showselstate=1
  68.     b.selected=state
  69.     b.font="BUTTON"
  70.     b.frame="BUTTON"
  71.     b.background="BUTTONBACK"
  72.     b.TextHiChar=cc
  73.     b.ControlChar=cc
  74.     b.TextHiCharIdx='_'
  75.     res=newobj("TEXT",name,"B")
  76.     if res then call esci(res)
  77.     return name
  78.