DIRECTORY IO USING [STREAM], Rope USING [ROPE]; FileViewerOps: CEDAR DEFINITIONS = BEGIN OPEN IO, Rope; SourceFromSelection: PROC [which: SelectionOption _ primary] RETURNS [fileName: ROPE _ NIL, index: INT _ -1]; SelectionOption: TYPE = {primary, feedback}; OpenSource: PROC [fileName: ROPE, index: INT, chars: INT _ 2, feedBack: STREAM _ NIL]; ShowLog: PROC [ fileName: ROPE, destroyIt: BOOL _ FALSE, createIconic: BOOL _ FALSE, blinkIfIconic: BOOL _ TRUE]; WaitUntilSaved: PROC [fileName: ROPE, feedBack: STREAM _ NIL]; AttachErrorLog: PROC[sourceFileName: Rope.ROPE]; RemoveErrorLog: PROC[sourceFileName: Rope.ROPE]; END. äFileViewerOps.mesa Paul Rovner, November 11, 1983 11:51 am ... returns the file name and position within the file for the selected Tioga viewer (returns [NIL, -1] if no valid Tioga viewer is selected). primary => use primary selection feedback => use feedback selection ... opens a viewer on the source file. If index >= 0, then also set the feedback selection to the given index (for "chars" characters). WaitUntilSaved tries to find a viewer (v) such that Rope.Find[(IF v.name # NIL THEN v.file ELSE v.name), fileName, 0, FALSE] # 0 AND v is in the process of being saved or is marked as a "newVersion". If such a viewer is found, this prints relevant messages on "feedBack" and waits until v.saveInProgress is TRUE, then until it goes FALSE, then returns. Find or open a viewer on sourceFileName and put an ErrorLog button in the menu. Change the icon to show that the file has errors. Remove the ErrorLog button from the viewer. Change the icon back. Destroy the errlog file. ÊĈ˜Jšœ™Jšœ'™'J™šÏk ˜ Jšœœœ˜Jšœœœ˜J˜—Jšœœ ˜ šœœœœ˜J˜šÏnœœ#˜šœ3™3JšœBœ™L—Jšœà™à—J™code1šžœœœ˜0Kšœ‚™‚—K˜šžœœœ˜0K™\—J™J™—šœ˜J˜J˜——…—~(