[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Swarm-Support] Reading from a different .scm file
From: |
Marcus G. Daniels |
Subject: |
Re: [Swarm-Support] Reading from a different .scm file |
Date: |
Tue, 24 May 2005 10:05:26 -0600 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
K a wrote:
I know that in Swarm I can read in the Lisp format scm file in the setup to
initialize certian values. However, would it be possible to read an scm file
with a different name to my swarm model (which I assigned when I init the
model) and a path not in the same directory as the application?
Sure, the thing to do is to make your own LispArchiver instance, like so:
import swarm.Globals;
import swarm.defobj.Zone;
import swarm.defobj.LispArchiver;
import swarm.defobj.LispArchiverImpl;
public class TestLispArchiver {
public String str = "test";
public static void main (String []args) {
Globals.env.initSwarm ("TestLispArchiver",
"0.0",
"address@hidden",
args);
LispArchiver archiver =
new LispArchiverImpl (Globals.env.globalZone, "test.scm");
archiver.putShallow$object ("obj", new TestLispArchiver ());
archiver.sync ();
}
}