On Feb 19, 2011, at 2:17 PM, Michael Crawford wrote:

> I'm trying to compare instances of NSNumber using NSSet.  I have a set of 
> numbers, which represent 64-bit persistent IDs for iTunes media-items.  I 
> access these values using the -[NSNumber longLongValue] method.  I'm adding 
> them to an instance of NSSet and then use that instance to determine whether 
> or not I've seen the given item before.


> Anyone have previous experience with this problem?  Can you shed some light 
> on where my thinking and assumptions are wrong.

The documentation for -[NSSet containsObject:] says:

Return Value — YES if anObject is present in the set, otherwise NO.

The documentation for -[NSSet member:] says:

Return Value — If the set contains an object equal to object (as determined by 
isEqual:) then that object (typically this will be object), otherwise nil.

Jim


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to