SourceFromSelection:
PROC [which: SelectionOption ← primary]
RETURNS [fileName: ROPE ← NIL, index: INT ← -1];
... returns the file name and position within the file for the selected Tioga viewer (returns [NIL, -1] if no valid Tioga viewer is selected).
SelectionOption:
TYPE = {primary, feedback};
primary => use primary selection
feedback => use feedback selection
ShowLog:
PROC [
fileName: ROPE,
destroyIt: BOOL ← FALSE,
createIconic: BOOL ← FALSE,
blinkIfIconic: BOOL ← TRUE];
WaitUntilSaved:
PROC [fileName:
ROPE, feedBack:
STREAM ←
NIL];
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.