distinctUnionOfObjects raises if nil object found
distinctUnionOfObjects raises if nil object found
- Subject: distinctUnionOfObjects raises if nil object found
- From: Alexander Lamb <email@hidden>
- Date: Mon, 12 Jun 2006 22:05:59 +0200
Hello,
I have the following call:
set = [self valueForKeyPath:@"email@hidden"];
Well, sometimes, "owner" is nil (for example a new task without an
owner).
It raises an exception with a "attempt to insert nil" which seems not
really correct. After all "nil" is not an object.
If I let the exception raise, my binding seem to get out of sync. Not
good.
So I catch the exception but my set variable is of course not "set".
So I have a problem.
The only way around this would be to either:
1) not use @distinctUnionOfObjects but implement my own building of
the set
2) force "owner" to always have a value (for example assigning it to
a "dummy" person) but I wanted to avoid this
Any idea?
Alex
--
Alexander Lamb
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden