IDE Menu |  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## File Menu

The file menu displays commands mostly dealing with opening, closing and saving files or groups of files (a project is a group of files). The commands on the menu are:

- New -- Creates an empty buffer in the IDE Editor for a new source code file (or other text file). You will be asked for a pathname for the new file the first time you invoke the Save command on this buffer.

- New Form -- Displays a New Form dialog which allows creating a new form and adding it to the current project.

- New Project -- Creates a new project, which is then known as the "current project" that is being developed in the IDE. The previous current project if any is closed (after prompting to save changes if needed).

  The directory-choosing dialog first appears asking for a default directory for the project's files. A project's files do not have to be placed into this directory, but having a default directory allows the IDE to default the file-selecting dialog to a directory that typically is convenient. The immediate parent directory name will also be the initial name of the project and its .lpr project definition file; for example, if you specify the directory `c:/allegro-projects/first/`, then the next File | Save All that is done will save the project definition file as c:/allegro-projects/first/first.lpr. (The project name could be changed later in the Project Manager dialog's Options tab, and its pathname could be changed by invoking File | Save As while the Project Manager is the selected window.)

  In addition, the first time a project is created there will be an earlier invocation of the directory dialog asking for a default parent directory for all new IDE projects. This default parent directory is used as the initially-selected parent directory whenever a new project asks for a default directory for that particular project. This dialog will not reappear as long as the allegro-ide-options.cl file is created and retained as usual, though the value could still be changed by setting the project-parent-directory configuration option.

  The project system does not have to be used for an application, but is necessary for building form windows interactively, and for using the File | Build Project Executable and File | Build Project Distribution commands rather than writing a call to generate-application.

  See also new-project-show-project-manager, new-project-show-editor, and new-project-create-form.

- Open -- Displays a source code file (or other plain-text file) in the editor for viewing and/or editing, after displaying a dialog to ask for the file to open. If an editor buffer is currently selected and context-sensitive-default-path is true, then the file dialog will default to the directory of that buffer's file, if any, and otherwise will default as usual to the directory from which a file was most recently selected with the file dialog. (On the very first invocation of the file dialog, the directory defaults according to start-in-allegro-directory.)

  The contents of the Files of Type field of the dialog is controlled by the value of the IDE configuration option source-file-types. That option controls the type field for this File | Open command and for the dialog displayed by the File | Save As when saving an Editor file.

  On GTK, to include dot files and other hidden files in the dialog's list, you would need to specify `ShowHidden=true` in the file ~/.config/gtk-2.0/gtkfilechooser.ini. But you can always type the name of a hidden file even if it's not shown in the list.

- Open Project -- Displays a dialog for choosing an existing project to further develop in the IDE. The project is then known as the current project. The previous current project if any is first closed (after prompting to save changes if needed). If any of the project's form windows were visible (not shrunk) when the project was last saved, then the first such form will be inspected in an Inspector window.

  If the open-project-show-files-in-editor configuration option is true, then each of the project's source code files will be opened in the editor. The Project Manager will be shown if open-project-show-project-manager is true. The project's code will be compiled and loaded according to the current value of the open-project-action option.

  There is also an Open Project item on the Recent menu. It displays a submenu of projects that have recently been opened, loaded, or saved, either in the current invocation of Lisp or a recent one. Selecting one of the projects opens it as the current project for editing.

- Close Pane -- Close the current editor buffer in the editor workbook. If the pane being closed is the only pane, the editor workbook is closed as well.

- Close Window -- Closes the selected window. Do not use this command to close a buffer in the Editor workbook as it will close the entire workbook, not just a single buffer. Use File | Close Pane to close an editor buffer.

- Close All Allegro Dialogs -- Displayed when a dialog is the selected window. Closes all dialogs except the Inspector (and the Debug window, Editor Workbook, and any forms). The result is the screen has roughly the same windows as when Allegro CL starts. All dialogs can be reopened later, of course.

- Close All Inspectors -- Displayed when an Inspector window is selected. Closes all Inspector windows. Display a new inspector with View | New Inspector.

- Close All Forms -- Displayed when a form is the selected window. Closes all forms. File | New Form creates a new, blank form.

- Close All Editors -- Displayed when the Editor workbook is the selected window. Closes all editor workbooks. View | New Editor displays a new editor workbook (whether or not one currently exists).

- Close All Class Graphs -- Displayed when a class graph window (as displayed by, say, Tools | Graph Subclasses) is selected.

- Close All Runtime Analyzer Graphs -- Displayed when a analysis graph window is selected. Closes all runtime analyzer graph windows.

- Save -- Saves the contents of the currently selected IDE window to a file, if that window supports the Save command.

  When the editor is selected, the text in the selected editor buffer is saved. If a new buffer is being saved for the first time, the file dialog will first ask for a pathname for the file. If the editor buffer is for the .cl file that is associated with a form window, then the form's .bil file is also generated at this time (see maker-function).

  If there is a current project, you will first be asked whether you would like to add the new file to the project. If you answer yes, then the file dialog will default to the current project's default directory, and the file will be added to the project after it is saved. If you answer no, then the file-selecting dialog will default as it otherwise would to the directory in which a file was last selected in the file dialog.

  The Save command may also be used in certain other IDE windows. For example, when the focus is in a listener in the Debug Window, the text in the listener will be saved. In a form window, the form's .bil file is generated (see maker-function) and its associated .cl file in the editor (if any) is saved. In a stack backtrace, a bug report that contains the stack information will be written. In the Trace Dialog's outline widget, the trace information will be written as indented text. In the Inspector, the currently displayed table of values will be written. In the Project Manager dialog, the current project's .lpr project definition file will be written.

  In some windows (the Class Browser, the Trace Dialog, the Runtime Analyzer Results dialog, the Inspector panes, and the backtrace pane in Debug window after an error) the text is actually written to a new editor buffer rather than to a file, to avoid the requirement to specify a pathname and create a file when you just want to view or copy the text. You can then use this same Save command in the editor buffer if you do want to save the text to a file.

- Save As -- Generally does the same thing as the Save command, except always first asking for a new pathname.

  You cannot use Save As when the Project Manager Dialog is the selected window. Save in that case saves the current project's .lpr project definition file, but that file should have the same filename as the project name, so it is inappropriate to use this command to modify the filename. Instead, change the name of the project (in the Options tab of the Project Manager) and say yes when asked if you want the .lpr name changed as well. To move the project files to a new directory, close the project, copy all the project files to the new directory using standard Operating System tools (such as the Windows Explorer) and then reopen the project from its new location.

- Save All -- Saves each editor buffer and form window that has unsaved changes, as well as the current project's .lpr file when there are unsaved changes to the project itself. When the file dialog appears to ask for a pathname for an object that has not yet been saved (perhaps a scratch editor buffer), canceling the dialog will skip that object without canceling the saving of other objects. A status-bar message will mention which objects were saved and which were skipped, or that nothing needs to be saved. This menu command is also on the right button menu (shortcut menu) over the background window. See View | Background Window.

- Revert to Saved -- Replaces the current contents of an editor buffer with the contents of the file associated with the buffer. Changes since the last save are thus discarded.

- Compile -- Displays a dialog to choose a Lisp source file to compile. The file is not loaded after compilation.

- Load -- Displays a dialog to choose a file to load. The file must be either a compiled Lisp file (fasl file), a lisp source code file, or a .lpr project definition file. If a fasl file or source code file is specified, then cl:load is called on that file directly. If a project definition file is specified, then load-project is called to load the project. (A loaded project may be used in the IDE, but is not the "current project" that is open for further development.)

- Compile and Load -- Displays a dialog to choose a Lisp source file to compile. The compiled file is then loaded.

- Build Project Executable -- Creates a standalone executable file for the current project in the main directory of the project. (An associated dxl file is also created, which gets loaded by the executable file.) This allows running the application by itself, outside of any development environment. The license file devel.lic is copied to the project directory from the Allegro directory, allowing the project executable to be run. Note that this directory is not suitable for distribution under a VAR agreement (use Build Project Distribution for that.

  If the name of the project (as specified on the Options tab of the Project Manager dialog) is my-application, for example, then the executable file will be named my-application on Linux or Mac, or my-application.exe on Windows. The dxl file will be named my-application.dxl.

  build-lisp-image is used to build the new image.

  See also build-project, which is a programmatic equivalent of this menu command.

- Build Project Distribution -- This command does everything that Build Project Executable does, and then also collects all files that are needed for distributing the application to others into a directory that you specify. A license file suitable for distribution under a VAR agreement is also placed in the directory.

  The default distribution directory will be a subdirectory of the project's main directory named dist. The additional files will include a license file, plus any shared libraries that are internally known to be needed, along with any libraries and other arbitrary distributed files that you have specifically added to the project.

  generate-application is called to do much of the work of this menu command.

  See also build-project, which is a programmatic equivalent of this menu command. Note that on Macs and Linus machines, your user must have X11 and GTK installed. See Users of your app must have necessary software installed (such as X11 and GTK) in delivery.htm for more information.

- Page Setup -- Displays a dialog for setting up a page of the printer.

- Print -- Prints the contents of the currently selected IDE window or widget, if that window or widget supports the Print command. This is typically used in the editor to print a source code file.

- Exit -- Exits Allegro CL and the IDE.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version