swarm-support
[Top][All Lists]
Advanced

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

Re: Can I do this?


From: Nelson Minar
Subject: Re: Can I do this?
Date: Sun, 4 Feb 96 12:03:22 MST

>I make an instance of Discrete2d space.  I have a Cell object
>which contains two linked list objects.
>I then [ mySpace putObjectatX: x Y:y ]
>Is there any reason why I shouldn't be doing this with the present
>space library?

This kind of thing should work fine:
  [mySpace putObject: aCell atX: x Y: y]

btw, we've planned out a version of Grid2d that stores lists of
objects at a spot. Current plan is for "getObjectAtX:Y:" to return the
entire list, and add something like "getRandomObjectAtX:Y:" for
convenience if you need it. I'm not sure yet if I'll lazily create
lists when they're needed, or just make enough lists to cover the space.

>After I put the Cells into the grid when I try do things with
>the linked lists I get various core type errors.

You'll need to debug these errors. Of course, if you use Grid2d
putObjectAtX:Y: it's not going to do anything magic about putting your
object into the right list in the cell - you need to write that code
yourself.


reply via email to

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