VerboseSaveAllEdits:
PUBLIC
PROC = {
poor man's crash recovery
Save: ViewerOps.EnumProc = {
MultiCursors.InvertACursor[NIL]; -- main cursor becomes a filled box
IF (v.newVersion
OR v.newFile)
AND v.class.save #
NIL
THEN
[] ← ViewerOps.SaveViewer[v ! ANY => CONTINUE];
v.newVersion ¬ v.newFile ¬ FALSE;
IF v.icon=dirtyDocument THEN v.icon ¬ document;
IF v.link#
NIL
THEN
FOR t: ViewerOps.Viewer ¬ v.link, t.link
UNTIL t=v
DO
t.newVersion ¬ t.newFile ¬ FALSE;
ENDLOOP;
MultiCursors.InvertACursor[NIL]; -- main cursor becomes a hollow box, again
RETURN[TRUE];
};
PaintCaption: ViewerOps.EnumProc = { ViewerOps.PaintViewer[v, caption] };
inner:
PROC = {
MultiCursors.SetACursor[activate, NIL]; -- main cursor becomes a hollow box
ViewerOps.EnumerateViewers[Save];
MultiCursors.SetACursor[textPointer, NIL]; -- to show the saves are done
ViewerOps.EnumerateViewers[PaintCaption]; -- ok if this doesn't finish
};
inner[];
};