home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Enigma Amiga Life 109
/
EnigmaAmiga109CD.iso
/
software
/
sviluppo
/
rxmui
/
examples
/
win.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-12-21
|
2KB
|
75 lines
/**/
signal on halt
signal on break_c
l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
if AddLibrary("rxmui.library")~=0 then exit
call createApp
call SetNotifies
call set("win","open",1)
call getattr("win","open","o")
if o=0 then do
say "can't open window"
exit
end
call handleApp
exit
/***********************************************************************/
handleApp: procedure
ctrl_c=2**12
s=0
do forever
call handle("APP","H",s)
do i=0 to h.num-1
if h.i="QUIT" then exit
say h.num-1 h.i
end
s=Wait(or(h.signals,ctrl_c))
if and(s,ctrl_c)>0 then exit
end
exit
/***********************************************************************/
err: procedure expose sigl rxmuierror
parse arg res
say signl "["res"]"
say getrxmuistring(res) "in line" sigl-1 rxmuierror
exit
/***********************************************************************/
createApp: procedure
app.Title="LitteExample"
app.Version="$VER: LitteExample 1.0 (10.12.99)"
app.Copyright="©1999, alfie"
app.Author="alfie"
app.Description="Just a little example"
app.Base="EXAMPLE"
app.SubWindow="WIN"
win.ID="MAIN"
win.Title="A LitteExample"
win.Contents="MGROUP"
mgroup.0="G"
g.frame="GROUP"
g.class="GROUP"
g.columns=2
g.0=label("_Name","DOUBLE")
name.cyclechain=1; g.1=String("NAME","n")
g.2=label("_Surname","DOUBLE")
surname.cyclechain=1; g.3=String("surname","s")
res=NewObj("APPLICATION","APP")
if res~=0 then call err(res)
return
/***********************************************************************/
setNotifies: procedure
res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
if res~=0 then call err(res)
return
/***********************************************************************/
halt:
break_c:
exit
/**************************************************************************/