home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / RxMUI / Examples / VL.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2004-01-31  |  1.7 KB  |  60 lines

  1. /* */
  2.  
  3. call Init
  4. call CreateApp
  5. call HandleApp
  6. /* never reached */
  7. /***********************************************************************/
  8. init: procedure
  9.     l="rmh.library";if ~show("L",l) then;if ~AddLib(l,0,-30) then exit
  10.     if AddLibrary("rexxsupport.library","rxmui.library")~=0 then exit
  11.     call RxMUIOpt("DebugMode ShowErr")
  12.     return
  13. /***********************************************************************/
  14. CreateApp: procedure
  15.     app.Title="kod"
  16.     app.Version="$VER: kod 1.0 (22.11.99)"
  17.     app.Copyright="©1999, koksa"
  18.     app.Author="kkoksa phd"
  19.     app.Description="kodda da worlda"
  20.     app.Base="LOV"
  21.     app.SubWindow="WIN"
  22.      win.Title="Title"
  23.      win.Contents="MGROUP"
  24.       mgroup.0="lv"
  25.        lv.Class="Listview"
  26.        lv.List="voll"
  27.         voll.Class="Volumelist"
  28.         voll.Frame="READLIST"
  29.       mgroup.1=Text("Vol")
  30.  
  31.     if NewObj("APPLICATION","APP")>0 then exit
  32.  
  33.     call Notify("win","closerequest",1,"app","returnid","quit")
  34.  
  35.     call Notify("lv","Doubleclick","everytime","app","returnid")
  36.  
  37.     call set("win","open",1)
  38.  
  39.     return
  40. /***********************************************************************/
  41. HandleApp: procedure  expose global.
  42.     ctrl_c=2**12
  43.     do forever
  44.         call NewHandle("APP","H",ctrl_c)
  45.         if and(h.signals,ctrl_c)>0 then exit
  46.         select
  47.             when h.event="QUIT" then exit
  48.             when h.event="LV" then do
  49.                 call DoMethod("voll","GETENTRY","ACTIVE","A")
  50.                 call set("vol","Contents",a.name)
  51.             end
  52.             otherwise nop
  53.         end
  54.     end
  55. /***********************************************************************/
  56. halt:
  57. break_c:
  58.     exit
  59. /**************************************************************************/
  60.