swarm-support
[Top][All Lists]
Advanced

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

Re: Error in Making a List in a new object.


From: Andrew Boyd
Subject: Re: Error in Making a List in a new object.
Date: Tue, 03 Aug 1999 15:05:54 -0500

Hi,
   I have tried removing:
[superBuildObjects]
I was not sure if that line was needed.  It did not help.  The difference 
between the sample code displayed by Marcus and the real code is that the 
following library files are included in the Cell.h

#import <objectbase/Swarm.h>
#import <objectbase/SwarmObject.h>
#import <activity.h>
#import <space.h>
#import "Comp.h"

and in Cell.m
#import "Cell.h"
#import <collections.h>
#import <objectbase.h>
#import <analysis.h>
#import <gui.h>

Also the difference is in the way that it is executed - this function is 
executed during the simulation.  I have succesfully created a list in the 
buildObjects phase with this function.  However, once this simulation is 
started, this function produces the error I had mentioned in my previous email. 
 

Andy Boyd
UT Southwestern Medical Center

<<< Marcus G. Daniels <address@hidden>  8/ 3  2:08p >>>
>>>>> "AB" == Andrew Boyd <address@hidden> writes:

AB> (class) Zone_c.Creating does not recognize allocIVars: Abort

I can't reproduce this.  How is your model different from this?
(Btw, I think that createCompList should not include buildObjects,
unless it *is* -buildObjects.)

#import <simtools.h> // initSwarm
#import <objectbase/Swarm.h>

@interface CellModelSwarm: Swarm
{
  id <List> compList;
}
- createCompList;
- getCompList;
@end

@implementation CellModelSwarm

- createCompList
{
  [super buildObjects];
  compList = [List create: self];
  return self;
}

- getCompList
{
  return compList;
}
@end

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

  initSwarmBatch (argc, argv);

  obj = [CellModelSwarm create: globalZone];
  [obj createCompList];
  xprint ([obj getCompList]);
}

/* 
Local Variables:
compile-command: "/opt/gnu/bin/gcc -o aboyd -g -Wno-import 
-L/opt/SUNWtcl/8.0/sun4/lib -R/opt/SUNWtcl/8.0/sun4/lib -L/opt/SDGblt/2.4g/lib 
-R/opt/SDGblt/2.4g/lib -L/opt/SDGlibffi/1.20/lib -R/opt/SDGlibffi/1.20/lib 
-L/opt/SDGswarm/1.4.1/lib -L/opt/SDGzlib/1.1.3/lib -L/usr/local/X11/lib 
-R/usr/local/X11/lib -L/usr/openwin/lib -R/usr/openwin/lib 
-L/opt/SDGhdf5/1.0.1/lib -I/opt/SDGswarm/1.4.1/include aboyd.m -lanalysis 
-lsimtools -lsimtoolsgui -lactivity -ltkobjc -lrandom -lobjectbase  -ldefobj 
-lcollections -lmisc  -ltclobjc -ltk8.0 -ltcl8.0 -lBLT -lsocket -ldl -lnsl 
-L/usr/openwin/lib -lhdf5 -lpng -lz -lXpm -lX11 -lffi -lm -lobjc -lpthread 
-lposix4"
End:
*/

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