• 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
Re: 'Raises For Not Applicable Keys' not enough to step exception raises?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'Raises For Not Applicable Keys' not enough to step exception raises?


  • Subject: Re: 'Raises For Not Applicable Keys' not enough to step exception raises?
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 6 May 2008 18:28:58 -0400
  • Organization: Rogue Research

On 5/6/08 2:03 PM, Keary Suska said:

>> I have an app that uses an NSOutlineView bound to an NSTreeController in
>> entity mode.  The tree controller matches all 'Shape' entities, but
>> there are also sub-entities named 'Square' and 'Circle'.  I have a
>> master-detail UI.  All 'Shapes' have a 'name' attribute and there is no
>> problem there.  Only 'Circle' has a 'radius' attribute however, and I
>> want to show this in a textfield.  I've bound the textfield and
>> unchecked the 'Raises For Not Applicable Keys'.
>>
>> The problem is that I'm still getting an NSException raised.  It's
>> raised from [Circle valueForUndefinedKey:].  'Circle' is an
>> NSManagedObject subclass.
>>
>> Does one also have to implement valueForUndefinedKey: in this
>> situation?  I thought removing 'Raises For Not Applicable Keys' was
>> supposed to be sufficient.
>
>I think you also have to specify a "Not Applicable" placeholder as
>well--have you done that?

I have.  And it is even correctly shown in the textfield.  But I still
get the exception thrown by NSManagedObject's valueForUndefinedKey:  The
docs even say "The default implementation raises an
NSUndefinedKeyException" which seems to be what I'm seeing, but I don't
get why its happening even with 'Raises For Not Applicable Keys' off.

Thanks for your help Keary.

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >'Raises For Not Applicable Keys' not enough to step exception raises? (From: "Sean McBride" <email@hidden>)
 >Re: 'Raises For Not Applicable Keys' not enough to step exception raises? (From: Keary Suska <email@hidden>)

  • Prev by Date: WebView does not expose bindings in IB 3
  • Next by Date: Re: Resource fork & metadata - max size?
  • Previous by thread: Re: 'Raises For Not Applicable Keys' not enough to step exception raises?
  • Next by thread: Cocoa UI Question
  • Index(es):
    • Date
    • Thread