The scenarios in this section cover full details of file-related commands of the CSTutor, some
of which have been introduced in preceding sections.
2.7.1. Save and Save As
A new tutorial is not associated with a file until it is saved for the first time. For new not-yet-saved tutorials, the `Save' and `Save As' commands have exactly the same effect. When the user selects either of these commands for a not-yet-saved tutorial, the system prompts the user for a save location using the standard file chooser. When the user presses `OK', the system saves the entire contents of the tutorial onto the named file. After completing the save, the system removes the save dialog from the screen. If the user enters the name of an existing tutorial file and presses `OK', the system asks for overwrite confirmation.
When the current tutorial is already associated with a file, the `Save' and `Save As' commands differ. The `Save' command is enabled whenever the current tutuorial is associated with a file, and the tutorial has unsaved changes. A tutorial has unsaved changes when the user has performed one or more of the following actions since the file was opened or the last confirmed save operation, whichever has occurred most recently:
When the user selects the enabled `Save' command in the `File' menu, the system saves the pages and settings for the current tutorial on the file associated with the tutorial.
The `Save As' command is enabled in the `File' menu whenever
the current tutorial is not that of another user or group. `Save As'
is enabled whether or not the current tutorial has unsaved changes.