Hi again Sean,
So I must be missing something. I'm simply invoking the remove method, like:
Is there a way to find which fields an object is be attached to?
On 7 August 2012 00:01, Sean Luke <[log in to unmask]> wrote:
> It's not possible that the objects have been removed from the field. Here's how draw() works.
> 1. The window tells the Display to draw.
> 2. The Display tells each Field Portrayal to draw.
> 3. The Field Portrayal for your Sparse Grid looks up all the objects in the grid. For each object:
> 3a. The Field Portrayal determines if the object is presently in the viewable area.
> 3b. If it is, the Field Portrayal looks up the Simple Portrayal for the underlying object and calls draw() on it.
> And that's about it. Your object has to be in the grid in order to receive a draw request, so far as I can think of.
> On Aug 6, 2012, at 11:30 PM, Luís de Sousa wrote:
>> Hi Sean, thanks for answering.
>> I'm sorry for not being more explicit, this is happening with objects
>> that have been stopped and removed from the field, a SparseGrid in
>> this case. So I believe they are not in the physical world any more.
>> On 1 January 2001 07:44, Sean Luke <[log in to unmask]> wrote:
>>> In fact, even after the simulation has *ended*, as long as you have objects present in the physical world, whenever the window is resized or certain other GUI events occur, the draw() method may *still* be called to redraw them.
>>> You should *always* redraw your objects. If you don't want them drawn, remove them from your field. If you'd like them to draw themselves with some default color indicating that they're "stopped", you could do that.