Re: Fwd: anyObject
Re: Fwd: anyObject
- Subject: Re: Fwd: anyObject
- From: Ondra Cada <email@hidden>
- Date: Thu, 31 Jan 2002 17:41:27 +0100
Robert,
>
>>>>> Robert Goldsmith (RG) wrote at Thu, 31 Jan 2002 16:30:21 +0000:
RG> I am trying to use the NSSet method anyObject which, according to the
RG> docs, returns a random object selected from the set or, if the set is
RG> empty, nil.
...
RG> (which shows the values have been stored ok) followed by 100 selections
RG> of the the NSNumber object that holds the value 0.
RG>
RG> Any suggestions?
Sure, to consider what the method is used for!
The "randomness" means there is no way to tel before which object will be
returned, *NOT* that it would or should be a different one each time.
Actually, the reason of the method is to give a _REPRESENTANT_ of the set.
It is selected always by the same algorithm, and thus unless set contents
changes, the representant will always be the same.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc