• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
distinctUnionOfObjects raises if nil object found
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: change notification for dependent key between classes?
  • Next by Date: Object for variable array of fixed structures
  • Previous by thread: Re: call to numberOfRowsInTableView during initialization
  • Next by thread: Object for variable array of fixed structures
  • Index(es):
    • Date
    • Thread