[Next] [Previous] [Up] [Top] [Contents] [Index]

Chapter 3: The Application Framework

Preserving programming sessions

When you program in MCL, you are creating objects: functions, classes, and other instances. You are building up state in your Lisp environment.

At times it is desirable to save a snapshot of your environment for later resumption. It may be that reproducing a particular state is very time consuming, either because it involves loading many files of Lisp code, because it requires performing other lengthy computations, or perhaps because your environment has gotten into an anomalous state which you want to examine later.

MCL includes a facility for saving snapshots--also known as images--of a running Lisp session. These snapshots can be restarted at a later time. They start up just about as quickly as starting up a new Lisp system.

To save an image, just call the function save-application. This function takes one required argument and a number of keyword arguments. The required argument is a pathname. It closes any open windows (these cannot be saved), writes an image to disk at the selected pathname, and then exits to the Finder. The saved image is a stand alone application. It can be restarted by double-clicking it, just like any other stand alone application.

  • Note: To restart an image created in MCL 4.0, the image must have access to MCL's three libraries, as described in the installation instructions. These libraries must be in the same folder as the image, or they must be in the Extensions folder, or aliases to them must be in one of these folders.

  • Note: If you save an image with the same signature as MCL (the default), then double-clicking on an MCL file in the Finder may launch the new image, or it may launch MCL. The choice is made by a caching mechanism in the Finder. To avoid confusion, you may wish to save images with a different signature, or else not launch MCL by double-clicking MCL files.

    A complete description of save-application is given in the MCL Reference.

    The functionality of save-application is also available through the Save Application... and the Extensions/Save Image... commands on the Tools menu.


    Gettmg Started with MCL - 19 OCT 1996
    [Next] [Previous] [Up] [Top] [Contents] [Index]

    Generated with Harlequin WebMaker