IdleHackingImpl.Mesa
Spreitzer, May 13, 1986 2:39:36 pm PDT
DIRECTORY AMBridge, AMTypes, Buttons, IdleHacking, Rope, ViewerClasses, ViewerOps;
IdleHackingImpl: CEDAR PROGRAM
IMPORTS AMBridge, AMTypes, ViewerOps
EXPORTS IdleHacking
=
BEGIN
TV: TYPE = AMTypes.TV;
Type: TYPE = AMTypes.Type;
procFieldName: Rope.ROPE ← "proc";
SetIdle: PUBLIC PROC [IdleProc: Buttons.ButtonProc] = TRUSTED {
idleButton: ViewerClasses.Viewer = ViewerOps.FindViewer["Idle"];
buttonDataRec: TV = AMBridge.TVForReferent[idleButton.data];
buttonDataRecType: Type = AMTypes.TVType[buttonDataRec];
procIndex: INT = AMTypes.NameToIndex[buttonDataRecType, procFieldName];
procVar: TV = AMTypes.IndexToTV[buttonDataRec, procIndex];
arg: TV = AMBridge.TVForProc[IdleProc];
AMTypes.Assign[procVar, arg];
};
END.