swarm-support
[Top][All Lists]
Advanced

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

RE: LispAppArchiver


From: Stacy Oerder
Subject: RE: LispAppArchiver
Date: Fri, 26 Apr 2002 17:00:14 +0200

During debugging, the program notifies me that it cannot find the
modelSwarm parameters, as I've highlighted in the main.m file, which is
what leads me to believe it is directly linked to the bug.scm file and
the way I'm inputting the file. Herewith is my code in the main.m file
and the bug.scm file and my makefile, hope that makes things clearer.

main.m

#import <simtools.h>               
#import <activity.h>
#import "ModelSwarm.h"

int
main (int argc, const char **argv)
{
  ModelSwarm *modelSwarm;

  initSwarmBatch (argc, argv);

  if ((modelSwarm = 
       [lispAppArchiver getWithZone: globalZone key: "modelSwarm"]) ==
nil)
    raiseEvent(InvalidOperation, "Can't find the modelSwarm
parameters");

  [modelSwarm buildObjects];
  [modelSwarm buildActions];
  [modelSwarm activateIn: nil]; 
  [[modelSwarm getActivity] run];

  return 0;

}


and bug.scm

(list 
 (cons 'modelSwarm
       (make-instance 'ModelSwarm
                      #:worldXSize 80
                      #:worldYSize 80
                      #:seedProb 0.9F0
                      #:bugDensity 0.01F0)))

and makefile

ifeq ($(SWARMHOME),)
SWARMHOME=../../swarm-2.1
endif
APPLICATION=bug
APPVERSION=2.1
address@hidden
OBJECTS=Bug.o  main.o ModelSwarm.o FoodSpace.o
DATAFILES = bug.scm
include $(SWARMHOME)/etc/swarm/Makefile.appl

main.o: main.m ModelSwarm.h
Bug.o: Bug.h Bug.m
ModelSwarm.o: ModelSwarm.h ModelSwarm.m
FoodSpace.o: FoodSpace.h FoodSpace.m

Regards
Stacy
-----Original Message-----
From: Marcus G. Daniels [mailto:address@hidden
Sent: 26 April 2002 04:53
To: address@hidden
Subject: Re: LispAppArchiver


>>>>> "SO" == Stacy Oerder <address@hidden> writes:

SO> So I've basically followed an exact example as in
SO> the tutorial and have written my bug.scm file etc.. but when I go
SO> to run the program, it compiles fine, there is an error directly
SO> related to my calling in the file with the parameters. 

What is the error?  Can you provide code?

                  ==================================
   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.


                  ==================================
   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]