home *** CD-ROM | disk | FTP | other *** search
- /* just a test example */
-
- if ~show("L","rexxsupport.library") then
- if ~addLib("rexxsupport.library",0,-30) then do
- say "can't find rexxsupport.library"
- exit
- end
-
- if ~show("L","rmh.library") then
- if ~addLib("rmh.library",0,-30) then do
- say "can't find rmh.library"
- exit
- end
-
- if ~show("L","rxwiz.library") then
- if ~addLib("rxwiz.library",0,-30) then do
- say "can't find rxwiz.library"
- exit
- end
-
- res=OpenSurface("test.wizard","SURFACE")
- if res~=0 then call error(res)
-
- win.Gads=15
- win.ID=1
- res=OpenWindow("SURFACE","WIN")
- if res~=0 then call error(res)
- ws=WindowSignal("SURFACE","WIN")
-
- list.0.list=1
- list.0="First List"
- list.0.0="First of First"
- list.0.1="Second of First"
-
- list.1.list=1
- list.1.Sel=1
- list.1="Second List"
- list.1.0="First of Second"
- list.1.1="Second of Second"
-
- list.2.list=1
- list.2="Third empty"
-
- list.3="Just a node"
-
- set.LIST="LIST"
- res=SetWizAttrs("SURFACE","WIN","HIE","SET")
- if res~=0 then call error(res)
-
- stop=0
- do while ~stop
- mask=Wait(ws)
- if and(mask,ws)~=0 then stop=handle("WIN")
- end
- call CloseWindow("SURFACE","WIN")
- call SnapShot("SURFACE")
- exit
-
- /**************************************************************************/
- error:
- parse arg code
-
- string=GetRxWizString(code)
- if string=="" then string="(codice sconosciuto: " || code || ")"
- if RXWIZERR~="RXWIZERR" then string = string "(field:" RXWIZERR || ")"
- say string "(" || "at line" SIGL-1 ||")"
- exit
- /**************************************************************************/
- handle: procedure expose list.
- parse arg o
- handle.wait=0
- res=HandleWindow("SURFACE",o,"HANDLE")
- if res~=0 then call error(res)
- if handle.imsg>0 then
- do i=0 to handle.imsg-1
- select
- when handle.i.class=="CLOSEWINDOW" then return 1
- when handle.i.class=="IDCMPUPDATE" then do
- say "Message from" handle.i.ObjectID":"
- select
- when handle.i.ObjectID=="DATE" then do
- call GetWizAttr("SURFACE","WIN","DATE","DAY","DAY")
- say "you selected day:" day
- end
- when handle.i.ObjectID=="PALETTE" then say "you selected colour:" handle.i.Selected
- when handle.i.ObjectID=="HIE" then do
- j=handle.i.coord
- if handle.i.DoubleClick==1 then
- say "You dobleclick on node:" j "=" list.j
- else say "You selected the node:" j "=" list.j
- end
- when handle.i.ObjectID=="STRING" then say "you wrote the string:" handle.i.String
- otherwise nop
- end
- say
- end
- otherwise say "Class:" handle.i.class
- end
- end
- return 0
- **************************************************************************/
-