[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Drop related problems (SimpleExperBug and Map)
From: |
Benedikt Stefansson |
Subject: |
Re: Drop related problems (SimpleExperBug and Map) |
Date: |
Fri, 13 Jun 1997 00:20:19 +0200 |
Roger,
Thanks for the response. Let me just see if I got your clarification on
the drop-key-issue right.
Rewinding to my previous message, my concern was to have a map
that I could reuse, where I don't want to drop the objects pointed
to by the map, but I'd like to erase the map and drop the keys
from the previous iteration before using the map again.
To erase both objects and keys from a map, and drop the keys
I would thus do something along these lines:
anIndex=[theCollection begin:[self getZone]];
while((aMember=[anIndex next]))
[[anIndex getKey] drop];
[anIndex drop];
[theCollection removeAll];
Does that seem right? Note that I do the removeAll call outside
the loop and after the index has been dropped so as not to confuse
the index while it is attraversing the collection.
Regards,
-Benedikt
--
------------------
Benedikt Stefansson address@hidden
Center for Computable Economics Tel. (310) 825-1777
Department of Economics, UCLA Fax. (310) 825-9528
Los Angeles, CA 90095-1477 http://cce.sscnet.ucla.edu
Laboratorio di Economia Tel. (0461) 882246
Dip. di Economia, U. di Trento Fax. (0461) 882222
38100, Trento, Italy http://www-ceel.gelso.unitn.it
==================================
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.
==================================