swarm-support
[Top][All Lists]
Advanced

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

Re: LispAppArchiver


From: Alex Lancaster
Subject: Re: LispAppArchiver
Date: 01 May 2002 02:57:08 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Hoe" == Hoe Kok Meng <address@hidden> writes:

Hoe>     Does assigning any value to the DATAFILE variable in the
Hoe> makefile make any difference in the way the codes are compiled?
Hoe> I've tried changing the value of the variable but the .exe
Hoe> program still expects a .scm file with root name same as the .exe
Hoe> file.

Hoe> Can someone clarify this? Thanks.

Marcus is correct in that DATAFILE does not specify the file that is
used for the reading of the data, but is used to tell the Makefile to
install that file to the datadir area when you do a "make install".

I think to get the effect you want, which is to specify a datafile
with a different name from the default <appName>.scm, you'll want to
use a custom LispArchiver instance, instructions on how to do that can
be found at in section 16.1.2 of the Swarm User Guide:

http://www.santafe.edu/projects/swarm/swarmdocs/userbook/swarm.user.user3.05.chapter.html#SWARM.USER.USER3.05-SIM-PARAMS-CUSTOM.SECT2

Basically you can create an instance of the archiver using the a
specified filename:

id archiver =  [LispArchiver create: globalZone setPath: "batch.scm"];

then you can do usual object creation, as per the other example:

if ((theTopLevelSwarm = 
      [archiver getWithZone: globalZone key: "batchSwarm"]) == nil) 
  raiseEvent(InvalidOperation, 
              "Can't find archiver file or appropriate key");

If you look in mousetrap, you'll find that MousetrapBatchSwarm.m has a
complete example (from which the user guide example is drawn from).

Alex
-- 
  Alex Lancaster           |  
  Swarm Development Group  |     web: http://www.swarm.org
-------------------------------------------------------------------

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]