swarm-support
[Top][All Lists]
Advanced

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

!(Collections Documentation)


From: Doug Donalson
Subject: !(Collections Documentation)
Date: Sat, 2 Mar 96 22:56:23 PST

Nelson or Roger or ...,

   Do you have some piece of code that demonstrates how to use
   the Map linked list.  I have been slogging around in the code
   for a while now and I can't seem to get it to work correctly.
   For example:
   
   
   I create the list
   
   eventList=[Map createBegin: aZone];
   [eventList createEnd];
   
   I now create an object and insert in into the list
   
   anEvent=[event createBegin: aZone];
  [anEvent setParms: (id)100 To: anEvent doWhat: M(print)];
   if( !([eventList at: anEvent->time insert: anEvent]) )
       puts("insert failed");
       
   The code seems to work thus far because I can do a successful
   getFirst and getCount.  
   
      anEvent=[eventList getFirst]; //This works
      anEvent1=[eventList removeKey: anEvent->time]; // This doesn't
      
   Also, if I try to do a second insert of an event with a different key
   I get a core dump.
   
   Doug Donalson
   
   PS  What I am trying to do is make a very simple schedular 
       similar to what I had in my origional simulation.  I have
       a simple predator-prey lattice model up and running but
       it is very slow and I am trying to see if I simplify the
       schedule if I buy anything. 


reply via email to

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