swarm-support
[Top][All Lists]
Advanced

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

Re: Error creating a List


From: Rick Riolo
Subject: Re: Error creating a List
Date: Fri, 11 Feb 2000 15:25:03 -0500 (EST)

Its hard to tell without seeing more of your program,
but it looks like you tried to access something
from one of the lists via an atOffset: and you 
asked for an object in a position beyound the end
of the list.  Eg, if you list had 10 things on it,
this will cause a problem:

  for ( i = 0; i <= 10; ++i ) {
      agent = [aList atOffset: i];
      ...
  }

- r

Rick Riolo                           address@hidden
Center for Study of Complex Systems (CSCS)
4477 Randall Lab                
University of Michigan         Ann Arbor MI 48109-1120
Phone: 734 763 3323                  Fax: 734 763 9267
http://www.pscs.umich.edu/PEOPLE/rlr-home.html

On Fri, 11 Feb 2000, Akiko Ogawa - RS/GIS lab wrote:

> Date: Fri, 11 Feb 2000 13:09:27 -0700 (MST)
> From: Akiko Ogawa - RS/GIS lab <address@hidden>
> Reply-To: address@hidden
> To: address@hidden
> Subject: Error creating a List
> 
> Hello,
> 
> I created a ModelSwarm that has a List of swarmObjects.
> In those swarmObjects, I created another List adding the following line.
> 
> >aList = [List create: [self getZone]];
> 
> 
> It compiled. But the program aborts with a message:
> 
> >*** event raised for error: OffsetOutOfRange
> >*** function: indexAtOffset(), file: 
> >/home/sanduku/apps/swarm-2.0.1/src/collections/Collection.m, line: 110
> >*** execution terminating due to error
> >/home/sanduku/apps/swarm-2.0.1/src/defobj/Symbol.m:173 -[Error(c) 
> >_raiseEvent:
> 
> Could anyone tell me what I did wrong?
> 
> Thank you.
> Akiko Ogawa
> 
> 
>                   ==================================
>    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]