[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sub-sub-swarming and Zones
From: |
Kerimcan Ozcan |
Subject: |
Sub-sub-swarming and Zones |
Date: |
Sat, 13 Jan 2001 00:18:31 -0500 (EST) |
Here is a problem that has stalled my work for three days now. I am using
simpleExperBug as a template. What I have is an ExperSwarm, a
ModelSwarm, and a Generator (which is another swarm nested in ModelSwarm).
I have not been able to activate the Generator within modelSwarm. I must
be screwing up the Zones..
Here are relevant excerpts from the code (run-time error messages and
comments follow at the end):
///////////////// from main.m ////////////////////
..
[experSwarm buildActions];
[experSwarm activateIn: nil];
..
//////////////// from ExperSwarm.m /////////////////
- buildActions
{
..
experActions = [ActionGroup create: self];
[experActions createActionTo: self message: M(buildModel)];
..
experSchedule = [Schedule createBegin: self];
[experSchedule setRepeatInterval: 1];
experSchedule = [experSchedule createEnd];
[experSchedule at: 0 createAction: experActions];
..
}
- activateIn: swarmContext
{
[super activateIn: swarmContext];
[experSchedule activateIn: self];
return [self getActivity];
}
- buildModel
{
modelSwarm = [ModelSwarm create: self];
..
[modelSwarm buildObjects];
[modelSwarm buildActions];
[modelSwarm activateIn: nil];
..
}
/////////////////// from ModelSwarm.m //////////////////
- buildActions
{
..
modelActions = [ActionGroup create: self];
[modelActions createActionTo: self message: M(buildGenerator)];
..
modelSchedule = [Schedule createBegin: self];
[modelSchedule setRepeatInterval: 1];
modelSchedule = [modelSchedule createEnd];
[modelSchedule at: 0 createAction: modelActions];
..
}
- activateIn: swarmContext
{
[super activateIn: swarmContext];
[modelSchedule activateIn: self];
return [self getActivity];
}
- buildGenerator
{
generator = [Generator create: self];
..
[generator buildObjects];
[generator buildActions];
[generator activateIn: nil];
..
}
/////////////////// from Generator.m /////////////////
- buildActions
{
generatorActions = [ActionGroup create: self];
.. //bunch of actions//
generatorSchedule = [Schedule createBegin: self];
[generatorSchedule setRepeatInterval: 1];
generatorSchedule = [generatorSchedule createEnd];
[generatorSchedule at: 0 createAction: generatorActions];
..
}
- activateIn: swarmContext
{
[super activateIn: swarmContext];
[generatorSchedule activateIn: self];
return [self getActivity];
}
--------------------------------------------------------
It compiles fine but here is the run-time error message:
Zone_c.Creating does not recognize allocIVars:
0 [sig] C2NS 2117 stackdump: Dumping stack trace to
C2NS.EXE.stackdump
Now when I go to Generator.m methods above and change each of the zones to
[self getZone] I get the following run-time error message:
0 [main] C2NS 2175 handle_exceptions: Exception:
STATUS_ACCESS_VIOLATION
4594 [main] C2NS 2175 stackdump: Dumping stack trace to
C2NS.EXE.stackdump
I'd greatly appreciate any suggestions and help on this problem since I
seem to be stalled by a problem which has little to do with my substantive
model.
Kerimcan Ozcan
University of Michigan
==================================
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.