swarm-support
[Top][All Lists]
Advanced

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

yet another Map question


From: Ken Gosier
Subject: yet another Map question
Date: Sun, 22 Oct 2000 04:55:54 -0400

According to the Ref guide, the next method of MapIndex has prototype:

- next: (id *)key

So, would the proper way to iterate over a Map be:

id <MapIndex> mapIndex = [map begin: [self getZone]];
id key, val;
for (val=[mapIndex next: key]; [mapIndex getLoc]==Member;
     val=[mapIndex next: key])
{
   // here can make calls to key, val as regular objects:
   // [key aFunc: anArg];
   // [val aFunc: anArg];
   // etc.
}
[mapIndex drop];


TIA once again--

Ken Gosier
address@hidden

                  ==================================
   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]