DIRECTORY IO, MessageWindow, Rope, SVError; SVErrorImpl: CEDAR PROGRAM IMPORTS IO, MessageWindow EXPORTS SVError = BEGIN gErrorStream: IO.STREAM; Problem: PUBLIC SIGNAL [msg: Rope.ROPE] = CODE; MsgType: TYPE = SVError.MsgType; -- {oneLiner, begin, middle, end}; SetErrorStream: PUBLIC PROC [errorStream: IO.STREAM] = { gErrorStream _ errorStream; }; GetErrorStream: PUBLIC PROC [] RETURNS [errorStream: IO.STREAM] = { RETURN[gErrorStream]; }; Blink: PUBLIC PROC [] = { MessageWindow.Blink[]; }; Append: PUBLIC PROC [msg: Rope.ROPE, msgType: MsgType] = { clearHerald: BOOL _ msgType = begin OR msgType = oneLiner; MessageWindow.Append[msg, clearHerald]; gErrorStream.PutF[msg]; IF msgType = oneLiner OR msgType = end THEN gErrorStream.PutChar[IO.CR]; }; AppendHerald: PUBLIC PROC [msg: Rope.ROPE, msgType: MsgType] = { clearHerald: BOOL _ msgType = begin OR msgType = oneLiner; MessageWindow.Append[msg, clearHerald]; }; AppendTypescript: PUBLIC PROC [msg: Rope.ROPE, msgType: MsgType] = { gErrorStream.PutF[msg]; IF msgType = oneLiner OR msgType = end THEN gErrorStream.PutChar[IO.CR]; }; PutF: PUBLIC PROC [msgType: MsgType, format: Rope.ROPE _ NIL, v1, v2, v3, v4, v5: IO.Value _ [null[]] ] = { -- to script and feedback line msg: Rope.ROPE _ IO.PutFR[format, v1, v2, v3, v4, v5]; Append[msg, msgType]; }; PutFHerald: PUBLIC PROC [msgType: MsgType, format: Rope.ROPE _ NIL, v1, v2, v3, v4, v5: IO.Value _ [null[]] ] = { -- to feedback line only msg: Rope.ROPE _ IO.PutFR[format, v1, v2, v3, v4, v5]; AppendHerald[msg, msgType]; }; PutFTypescript: PUBLIC PROC [msgType: MsgType, format: Rope.ROPE _ NIL, v1, v2, v3, v4, v5: IO.Value _ [null[]] ] = { -- to script only msg: Rope.ROPE _ IO.PutFR[format, v1, v2, v3, v4, v5]; AppendTypescript[msg, msgType]; }; NotYetImplemented: PUBLIC SIGNAL = CODE; END. ζFile: SVErrorImpl.mesa Last edited by: Eric Bier on January 27, 1987 11:28:43 pm PST Contents: Routines for handling user error messages throughout Solidviews. (It's never too late to try to do it right. Global Variables ΚΛ˜Ihead™J™=J™wJ™šΟk ˜ Jšœ˜!J˜—šœ œ˜Jšœœ˜Jšœ ˜J˜—š˜J˜J™J™Jšœœœ˜J˜—Icodeš Οnœœœ œœ˜/Lšœ œΟc"˜CL˜š žœœœœœ˜8Jšœ˜J˜J˜—š žœœœœœœ˜CJšœ˜J˜—J˜šžœœœ˜Jšœ˜Jšœ˜J˜—šžœœœ œ˜:Jšœ œœ˜:Jšœ'˜'Jšœ˜Jš œœœœœ˜HJ˜J˜—šž œœœ œ˜@Jšœ œœ˜:Jšœ'˜'J˜J˜—šžœœœ œ˜DJšœ˜Jš œœœœœ˜HJ˜J˜—š žœœœ!œœœŸ˜ŠLšœ œœ#˜6Lšœ˜L˜L˜—š ž œœœ!œœœŸ˜ŠLšœ œœ#˜6Lšœ˜L˜L˜—šžœœœ!œœœŸœ˜‡Lšœ œœ#˜6Lšœ˜L˜J˜—Jšœœœœ˜(J˜Jšœ˜J˜—…— Ρ