DIRECTORY
Clock, Commander, IO, Process, Menus, ViewerOps, Rope, ViewerClasses;
VideoCommands:
CEDAR
PROGRAM
IMPORTS Clock, Commander, IO, Process, ViewerOps
SHARES Clock = {
clockForwards: INT ← 10;
clockPause: INT ← 500;
KickClock:
PROC = {
viewer: ViewerClasses.Viewer ← ViewerOps.FindViewer["Clock"];
data: REF ← viewer.data;
FOR i:
INT
IN [0..clockForwards]
DO
Clock.ChangeOffset[parent: viewer, clientData: data, mouseButton: yellow, shift: TRUE, control: FALSE]; -- one minute forward
Process.Pause[Process.MsecToTicks[clockPause]];
ENDLOOP;
};
rope1: Rope.ROPE ← "PolleZ is visiting Terry at 2:03 PM.\n PolleZ calls will ring in Terry's office and PolleZ's office.\n";
rope2: Rope.ROPE ← NIL;
Visit: Commander.CommandProc = {
CommandProc: TYPE = PROC [cmd: Handle] RETURNS [result: REF ← NIL, msg: ROPE ← NIL];
IO.PutRope[self: cmd.out, r: rope1];
IO.PutRope[self: cmd.out, r: rope2];
};
Commander.Register["Visit", Visit];
}.
Polle Zellweger (PTZ) February 12, 1986 5:44:03 pm PST
changes to: DIRECTORY, VideoCommands, KickClock (local of VideoCommands), Visit (local of VideoCommands)