Re: A strange behavior of unionSet?
Re: A strange behavior of unionSet?
- Subject: Re: A strange behavior of unionSet?
- From: Pete Yandell <email@hidden>
- Date: Mon, 26 Jan 2004 00:23:23 +1100
On 26/01/2004, at 12:09 AM, Thomas Lachand-Robert wrote:
>
Is anyone aware of a possible problem in unionSet (a method in
>
NSMutableSet)? Or is there something I don't understand?
>
>
I have the following code, where set1 and set2 are two sets containing
>
each only one element:
>
NSMutableSet* s = [set1 mutableCopy];
>
s = [s unionSet:set2];
The definition of unionSet from the docs:
- (void)unionSet:(NSSet *)otherSet
So you're assigning the result of a void method to s. You want it
without the assignment:
[s unionSet:set2];
Pete Yandell
http://pete.yandell.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.