swarm-support
[Top][All Lists]
Advanced

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

[Swarm-Support] shuffling a list


From: Corinne A. Coen
Subject: [Swarm-Support] shuffling a list
Date: Tue, 25 Feb 2003 14:03:41 -0500 (EST)

I have been unable to get any form of list shuffler to work.

I've downloaded Ted Belding's shuffler.tar.gz and included Shuffler.h and 
Shuffler.m into my model.  I've included this new object in my Makefile, 
created it in ModelSwarm.m

Since Ted's Shuffler involves a Shuffle.h and Shuffle.m file, I treated 
them like an additional object in my model.  I created Shuffle in 
ModelSwarm.m

  [Shuffler setModel: self];
  shuffler = [Shuffler create: globalZone];

In Shuffle.m, I set the model.. (of course, identifying the method in 
Shuffler.h)

  id model;

  @implementation Shuffler

  +(void) setModel: (id) m { model = m; }

I can compile the model, but when I run it, I get the following error 
message:

error: Shuffler (class)
Shuffler does not recognize setModel:
Aborted

So then I removed all of the "setModel" methods, and get the following 
complaint.

*** event raised for error: InvalidCombination
shuffler was created without a random
number generator.
*** execution terminating due to error
/home/pauljohn/LinuxDownloads/redhat/BUILD/swarm-2.1.107.20010925/src/defobj/Symbol.m:173
 
-[Error(c) _raiseEvent:]
Aborted


Finally, as an alternate approach, I tried using ListShuffler in 
collections.h.  Unfortunately, when I call  the list shuffler, it does not 
recognize the method described in the swarm documentation  (e.g., 
[ListShuffler shuffleWholeList: myList]). 

error: ListShuffler_c.Creating (class)
ListShuffler_c.Creating does not recognize shuffleWholeList:
Aborted 

Any ideas for me?
Corinne Coen






reply via email to

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