home *** CD-ROM | disk | FTP | other *** search
- /*just a simple clock window*/
-
- parse arg screen
-
- wiz.Snapshot=1
- res=OpenSurface("clock.wizard","WIZ")
- if res~=0 then call error(res)
-
- win.PubScreen=screen
- win.FallBack=1
- win.Gads=2
- win.ID=1
- win.Activate=1
- win.SizeGadget=1
- res=OpenWindow("WIZ","WIN")
- if res~=0 then call error(res)
- ws=WindowSignal("WIZ","WIN")
-
- timer=CreateTimer()
- ts=TimerSignal(timer)
-
- mask=or(ts,ws)
-
- rec=0
- do forever
- if and(rec,ws)~=0 then exit
- set.text=FormatDate(,"%d %b %Y %H:%M:%S")
- res=SetWizAttrs("WIZ","WIN","CLOCK","SET")
- if res~=0 then call error(res)
- call StartTimer(timer,0,950000)
- rec=Wait(mask)
- end
- exit
-
- /**************************************************************************/
- error:
- parse arg code
- call PrintFault(IoErr(),ProgramName())
- string=GetRxWizString(code)
- if string=="" then string="(codice sconosciuto: " || code || ")"
- if RXWIZERR~="RXWIZERR" then string = string "(field:" RXWIZERR || ")"
- say string "(" || "linea" SIGL-1 ||")"
- exit
- /**************************************************************************/
-