[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
removing an object from list
From: |
Jae Chan Oh |
Subject: |
removing an object from list |
Date: |
Wed, 26 Feb 1997 01:00:20 -0500 (EST) |
Hi,
In my simulation, I need to remove an arbitrary object from a list.
The list is basically the same as pplList in hello-world/v03.
Currently, I'm trying to send remove message to pplList in "step" method
in Person.m.
i.e. something like: [pplPresent remove: self]; is done.
where pplPresent is just another head to the list pplList.
But:
First, I'm not quite sure that this is the correct way to call remove nor
I'm not it is the best way. I think calling remove from pplModelSwarm.m
would make things complicated since I would have traverse the list.
Currently, I'm getting "core dump" on the above call to the list.
Any suggestions???
Thanks in advance..
---
Jae Chan Oh
Department of Computer Science
The University of Pittsburgh
Office: 315AL 624-8456
WWW - http://www.cs.pitt.edu:80/~joh/
- removing an object from list,
Jae Chan Oh <=