[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: what's wrong with this use of the index to clean a list?
From: |
Paul Johnson |
Subject: |
Re: what's wrong with this use of the index to clean a list? |
Date: |
Wed, 27 Oct 1999 17:04:07 -0500 |
"Marcus G. Daniels" wrote:
>
> >>>>> "PJ" == Paul Johnson <address@hidden> writes:
>
> PJ> I found a little problem that a list called "offerList" was not
> PJ> getting cleaned out when I wanted it to. I don't understand why id
> PJ> does not, but I keep getting the exit at the end.
>
> Do you have nils in the offerList?
>
> Do you get the same behavior with:
>
> for (member = [index next]; [index getLoc] == Member; member = [index next])
OK, that makes the problem go away.
What bothers me now is that I don't have any idea how the nil got in
there. I don't even really understand what it would mean to have a nil
in a Swarm List object.
I have seen the part of the collections documents where it uses that
kind of for loop that you reminded me of. I can understand how a nil
would get in a Map object, if you did [theMap at: keyvalue insert:
nil]. But I don't see how a List object could have a nil when I'm just
using addLast: to put things in there. And I never do [offerList
addLast:nil]. It must be the case, then, that I've got some other glitch
in the model, so I add some nonexistand object to the list and it
automatically slammed in a nil for me?
--
Paul E. Johnson email: address@hidden
Dept. of Political Science http://lark.cc.ukans.edu/~pauljohn
University of Kansas Office: (785) 864-9086
Lawrence, Kansas 66045 FAX: (785) 864-5700
==================================
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.