A strange behavior of unionSet?
A strange behavior of unionSet?
- Subject: A strange behavior of unionSet?
- From: Thomas Lachand-Robert <email@hidden>
- Date: Sun, 25 Jan 2004 14:09:24 +0100
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];
Then I get a nil pointer for s, after unionSet! (I don't understand how
possibly unionSet could return a nul pointer; anyway it does here).
On the other hand, if I change the code to:
NSMutableSet* s = [set1 mutableCopy];
[s addObjectsFromArray:[set2 allObjects]];
then I get a two elements set as expected.
Any clue about this?
Thanks,
Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
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.