swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Reading from a different .scm file


From: K a
Subject: Re: [Swarm-Support] Reading from a different .scm file
Date: Tue, 24 May 2005 08:22:11 -0800

Thanks a lot - I got it to work. Note the second argument to LispArchiverImpl 
constructor is simply the abstract pathname to the scm file, which allowed me 
to read any scm files from any directories.

> 
> 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 ();
>     }
> }
> 
> 
> 
> 
> _______________________________________________
> Support mailing list
> address@hidden
> http://www.swarm.org/mailman/listinfo/support


-- 
_______________________________________________
NEW! Lycos Dating Search. The only place to search multiple dating sites at 
once.
http://datingsearch.lycos.com




reply via email to

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