[Openmcl-devel] new snapshot tarballs (finally)

Gary Byers gb at clozure.com
Thu Oct 26 21:41:37 PDT 2006

I think that one of the changes related to the default toplevel-function
is that it the default toplevel function explicitly creates the standard
streams now.  (That used to happen earlier and via a different mechanism,
but it now has to happen after command-line arguments are parsed to pick
up the --terminal-encoding argument.)

SAVE-APPLICATION really need to be documented and some things need to be
straightened out a bit, but another approach to customization is to
subclass the CCL:APPLICATION class and define a CCL:TOPLEVEL-FUNCTION
method which specializes on it:

(defclass my-application (ccl:application)
   ;; It might also be appropriate to subclass CCL::LISP-DEVELOPMENT-SYSTEM
   ;; or at least look at/copy some of that class's methods.

(defmethod toplevel-function ((app my-application) init-file)
   (declare (ignore init-file))
   (call-next-method)	; do standard initialization stuff
   ;; What your application does here - and what some of the options
   ;; are - should be better documented.

With those definitions in place, you can then do:

(save-application "some-image-pathname" :application-class 'my-application)

Whether that's easier or not is hard to say, but it's pretty critical to most
applications that the APPLICATION class's TOPLEVEL-FUNCTION method gets a chance
to run (or that the things that it does get a chance to happen.)

On Thu, 26 Oct 2006, Erik Pearson wrote:

> Hi Gary,
> Everything worked well, other than something being tweaked with using 
> save-application with a custom toplevel-functionl. But I'm on shaky ground 
> there anyway, so I probably had something funky. Updating the 
> toplevel-function by combining one of the examples (in l1-application) and 
> what I had before and it looks great.
> Thanks!
> Erik.
> --On October 25, 2006 8:38:47 PM -0600 Gary Byers <gb at clozure.com> wrote:
>> On Wed, 25 Oct 2006, Gary Byers wrote:
>>> The good news is that whatever the fix is it won't involve some horrible
>>> bootstrapping cycle ... let me look at this, check something into CVS,
>>> and get back to you.
>> I think that this (and the PEEK-CHAR problem that Ben Hyde reported)
>> should now be fixed in CVS.
>> _______________________________________________
>> Openmcl-devel mailing list
>> Openmcl-devel at clozure.com
>> http://clozure.com/mailman/listinfo/openmcl-devel
> --
> Erik Pearson
> Adaptations

More information about the Openmcl-devel mailing list