[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Calling Lisp



To:   Steve Graham    graham@vax2.cstp.umkc.edu
cc:   info-mcl
From: Steve Mitchell
Date: 02-13-92
 
> I want to be able to invoke a lisp application from another
> language (probably C), have the lisp app run without creating
> any windows and return a result to the C program (and perhaps
> be called several times once started) and then have the other
> program terminate the lisp app.
 
Thanks to System 7 and MCL2's support of it, what you want to
do is pretty straightforward.
 
You can create a faceless standalone MCL2 application using
#'save-application with an appropriate :toplevel-function
argument. In your app define methods to handle the Open
Application and Quit Application AppleEvents to behave
appropriately when the other program starts it up, and tells
it to go away. Each call from the other program will consist
of it sending an AppleEvent, and your app running a handler
you will have defined, and sending a reply AppleEvent. The
System 7 Process Manager provides the tools for the other
program to find your app.
 
I believe that between them, Inside Macintosh Volume Six and the
MCL 2.0 final program, Reference, and examples, will contain
everything you need to do the MCL app. MCL 2.0b1p3's AppleEvents
support may be too limited, and is not documented in the Reference.
 
_Steve