swarm-support
[Top][All Lists]
Advanced

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

Re: [Swarm-Support] Followup: found work-around for missing ~/swarmarchi


From: Pietro Terna
Subject: Re: [Swarm-Support] Followup: found work-around for missing ~/swarmarchiver.scm too
Date: Mon, 14 Aug 2006 22:47:08 +0200

        Hi Paul and all,

        a few notes about Paul’s communication reported below.

1.

Using the rpm distribution for Fedora 5 we have also problems in instance creation via lispAppAchiver:

e.g. "heatbugs –b" (for batch execution) fails.

In ObjC we can fix the problem as follow (//pj line is from Paul’s suggestion below; //pt one is mine

(file main.m of heatbugs)

int
main (int argc, const char **argv)
{
  id theTopLevelSwarm;

  // Swarm initialization: all Swarm apps must call this first.
  initSwarm (argc, argv);

lispArchiver = [LispArchiver create: globalZone setPath: "/home/terna/.swarmArchiver.scm"]; //pj lispAppArchiver = [LispArchiver create: globalZone setPath: "heatbugs.scm"]; //pt

2.

The .swarmArchiver.scm file created in the way above is not standard, lacking a part of the Scheme expression, with the application name etc.

3.

I tried to introduce the same correction also in jheatbugs (the Java version has the same init problems). Look at the lines below (//pt lines are mine)

(file StartHearbugs.java)

import swarm.Globals;
import swarm.defobj.LispArchiverImpl; //pt

public class StartHeatbugs {

    public static void main (String[] args) {


Globals.env.initSwarm ("jheatbugs", "2.1", "address@hidden", args);

       Globals.env.lispArchiver= new LispArchiverImpl(Globals.env.globalZone,
"~/.swarmArchiver.scm"); //pt 1 Globals.env.lispAppArchiver = new LispArchiverImpl(Globals.env.globalZone, "jheatbugs.scm");//pt 2

the '//pt 2' correction works perfectly; the 'pt 1' has no effects, as something had gone definitively wrong in the init step.

        Yours, Pietro

At 08.17 13/07/2006, you wrote:
Concerning the point that the window geometries are not saved anymore, I have a work around.

Recall the problem is that lispArchiver is not created. If you debug in main.m, of any swarm app, you'll find "lispArchiver" is not created by initSwarm (at least on Fedora Core Linux).

The global variable "lispArchiver" is defined, but it is nil. So just put in this one line in main.m:

lispArchiver = [LispArchiver create: globalZone setPath: "/tmp/swarmArchiver.scm"];

Run the model, hit the "save" button,and the settings are saved into /tmp/swarmArchiver.scm.

Still don't know the reason why gcc-4.1 (or something else in FC5 broke), but I'm starting to suspect I may figure it out someday. In Heatbugs, I find that inserting this line after initSwarm will cause the saving and recovering to work as it did before.


lispArchiver = [LispArchiver create: globalZone
          setPath: "/home/pauljohn/.swarmArchiver.scm"];

I fiddled around with ways to automate the retrieval of my HOME directory. But all the ways I try cause a seg fault. So I'll spare you.

pj


--
Paul E. Johnson                       email: address@hidden
Professor, Political Science          http://pj.freefaculty.org
1541 Lilac Lane, Rm 504
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66044-3177           FAX: (785) 864-5700

_______________________________________________
Support mailing list
address@hidden
http://www.swarm.org/mailman/listinfo/support




reply via email to

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