swarm-support
[Top][All Lists]
Advanced

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

Re: Randomising ActionGroup


From: Axel von Kamp
Subject: Re: Randomising ActionGroup
Date: Thu, 25 Feb 1999 11:11:54 +0000

>
> AVK> Is randomising of ActionGroups already implemented or not?
>
> It is.
>
> AVK> The ActionGroup_c class in ActionGroup.h contains a method called
> AVK> - (void)setDefaultOrder: aSymbol;
> AVK> but the ActionGroup protocol iself doesn't have it.
>
> setDefaultOrder: is the interface.
> (It comes from mixin inheritance from CompoundAction.m.)
>
> Take a look at tests/activity/ActionGroupRandomized.m for an example.
>

This example uses a class which is subclassed from ActionGroup_c; I
cannot get it to compile though.  So I've tried using the ActionGroup_c
class directly in the following way:

  monomerActions= [ActionGroup_c createBegin: [self getZone]];
  [monomerActions setDefaultOrder: Randomized];
  monomerActions= [monomerActions createEnd];

But as soon as I create an action like in:

  [monomerActions createActionTo: container message: M(doMonomerMotion)];

I get a segmentation fault. If I use ActionGroup instead of ActionGroup_c
in the createBegin message above and comment out the setDefaultOrder
message erverything works fine but, naturally, I don't get a randomised
order of execution.
BTW, I'm usind Swarm 1.4 on a RedHat 5.1 Linux box. I've compiled Swarm
from the source code.

Regards,
Axel







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