• 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: Binding to an accessor that is only valid for subclass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding to an accessor that is only valid for subclass


  • Subject: Re: Binding to an accessor that is only valid for subclass
  • From: BareFeet <email@hidden>
  • Date: Wed, 3 Feb 2010 14:20:55 +1100

Hi All,

>> You can also uncheck the "Raises For Not Applicable Keys" in the bindings inspector pain in Interface Builder for your text fields.
>
> Thanks for the tip. Once I read it, it seemed like the logical solution. However, it doesn't seem to make any difference.

After some further investigation, turning off "Raises For Not Applicable Keys" does actually work and solves my problem. Hooray! :-)

It wasn't making any difference previously because my model key path was something like parsedDictionary.subValue. Even with "Raises For Not Applicable Keys" disabled, I still got an error like:

HIToolbox: ignoring exception '[<TopClass 0x100488c30> addObserver:<NSKeyValueObservance 0x10048c1a0> forKeyPath:@"parsedDictionary.subValue" options:0x100 context:0x0] was sent to an object that is not KVC-compliant for the "parsedDictionary" property.' that raised inside Carbon event dispatch

So I added a routine to my code for the SubClass:

- (NSString*) subValue
{
	return [parsedDictionary objectForKey:@"subValue"];
}

and changed the bindings in IB for the text field to simply have the model key path: subValue

Thanks again to John and Jerry for replying.

Thanks,
Tom
BareFeet

 --
Comparison of SQLite GUI tools:
http://www.tandb.com.au/sqlite/compare/?ml

_______________________________________________

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: 
 >Binding to an accessor that is only valid for subclass (was: Node hierarchy with subclasses) (From: BareFeet <email@hidden>)

  • Prev by Date: Rosetta Quandry
  • Next by Date: Re: Rosetta Quandry
  • Previous by thread: Binding to an accessor that is only valid for subclass (was: Node hierarchy with subclasses)
  • Next by thread: Re: Binding to an accessor that is only valid for subclass (was: Node hierarchy with subclasses)
  • Index(es):
    • Date
    • Thread