Edited by Teitelman on March 10, 1983 2:55 am
The items in this interface will be moved to UserExec..
DIRECTORY
UserExec USING [HistoryEvent, ExecHandle, ROPE, STREAM, TV, Type],
WorldVM USING [World]
;
UserExecExtras: CEDAR DEFINITIONS =
BEGIN OPEN UserExec;
constants and variables
version: ROPE;
defaultDepth, defaultWidth: INT; -- controls printing of expressions.
signals
NewErrorThisEvent: ERROR [event: HistoryEvent, msg: ROPE, offender: ROPENIL];
For use from inside of (or under) a commandProc. Equivalent to returning [FALSE, msg] as the value of the commandProc. offender is the "bad guy", e.g. in File Not Found: Foo.mesa, offender is Foo.mesa.
manipulating execHandles
GetSessionLog: PROC RETURNS[STREAM];
NIL means no session log.
GetChangesLog: PROC RETURNS[STREAM];
NIL means no changes log.
GetWorld: PROC RETURNS[WorldVM.World];
If this process is under an exec, and exec corresponds to an action area, returns world for that action area, otherwise returns local world.
processing events
CreateEvent: PROC [exec: ExecHandle, input: ROPE] RETURNS[event: HistoryEvent];
creates a new event, with indicated input and next higher event number, and modifies the exechandle appropriately.
ReasonFailed: PROC [event: HistoryEvent, offender: ROPE ← NIL];
saves offender on event for use by Use command. Used for those cases where an error is not going to be generated, e.g. File Not Found: mumble, or by interpreter.
CorrectionDisabled: PROC[event: HistoryEvent] RETURNS[disabled: BOOL];
WaitUntilSaved: PROC [fileName: ROPE, exec: UserExec.ExecHandle];
If a save is in progress, waits untils save finishes. If the viewer has been edited but not saved, asks the user if he wants to save the file. Interactions in exec.
AttachDefaultArgVal: PROCEDURE [type: Type, default: TV]; -- associates a default value with corresponding type.
END. -- UserExecExtras