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]; 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. Ê‡˜Jšœ™Jšœ'™'J™šÏk ˜ Jšœœœ˜Jšœœœ˜J˜—Jšœœ ˜ šœœœœ˜J˜šÏnœœ#˜šœ3™3JšœBœ™L—Jšœà™à—J™—šœ˜J˜J˜——…—£