14.4 Editing and saving code
Choose File > Save to save the current interface. If it has already been saved to a file, the new version is saved to the same file. If the interface has not been saved before, you are prompted for a filename. After saving, the file is displayed in the editor.
Choose File > Save As to save the current interface to a specific file. This command always prompts you for a filename; if the interface has not been saved before, this command is identical to File > Save, and if the interface has already been saved, this command saves a copy into the file you specify, regardless of the file it was originally saved in. After saving, the file is displayed in the editor.
Choose File > Save All to save all of the interfaces that have been modified. A dialog allows you to specify precisely which interfaces to save. Choosing this command is analogous to choosing File > Save individually for each of the interfaces you want to save. If there are any interfaces which have not been saved previously, you are prompted for filenames for each one.
Choose File > Revert to revert the current interface to the last version saved.
Choose File > Close to close the current interface. You are prompted to save any changes if you have not already done so. The interface name is removed from the History > Items submenu.
Individual interface definitions are saved in an intelligent fashion. You can specify the same filename for any number of interfaces without fear of overwriting existing data. Interface definitions which have not already been saved in a given file are added to the end of that file, and existing interface definitions are replaced by their new versions. Source code which does not relate directly to the definition of an interface is ignored. In this way, you can safely combine the definitions for several interfaces in one file, together with other source code which might be unrelated to the user interface for your application.
Conversely, when loading interfaces into the environment (using File > Open), you do not have to specify filenames which only contain definitions of interfaces. The interface builder scans a given file for interface definitions, loads the definitions that you request, and ignores any other code that is in the file. See Section 14.1.2 for details on loading interfaces into the interface builder.
This approach to saving and loading interface definitions ensures that your working practices are not restricted in any way when you use the interface builder to design a GUI. You have complete control over the management of your source files, and are free to place the source code definitions for different parts of the GUI wherever you want; the interface builder can load and save to the files of your choice without failing to load interface definitions and without overwriting parts of the source code which do not relate directly to the GUI.
Generated with Harlequin WebMaker