Re: Key-Value Coding default accessor search implementation
Re: Key-Value Coding default accessor search implementation
- Subject: Re: Key-Value Coding default accessor search implementation
- From: Francis Derive <email@hidden>
- Date: Fri, 18 Nov 2005 18:43:08 +0100
Yes ! That's it !
I was reading this doc, and didn't notice how delicate it is.
Merci beaucoup Wain.
Francis.
On Nov 18, 2005, at 3:37 PM, Wain wrote:
On 18 Nov 2005, at 14:23, Francis Derive wrote:
Hello,
Exercising on this subject, I get an error when I substitute
"myInstance" with "ismyInstance".
It is fine with "_myInstance".
Look at http://developer.apple.com/documentation/Cocoa/Conceptual/
KeyValueCoding/Concepts/SearchImplementation.html
It states this in relation to the Default Search Pattern for
setValue:forKey:
"If no accessor is found, and the receiver’s class method
accessInstanceVariablesDirectly returns YES, the receiver is searched
for an instance variable whose name matches the pattern _<key>,
_is<Key>, <key>, or is<Key>, in that order."
-- note that for both 'is' options the Key has a capital K
Have you tried using a capital first letter?
Wain
___________________________________________________________
Yahoo! Messenger - NEW crystal clear PC to PC calling worldwide
with voicemail http://uk.messenger.yahoo.com
_______________________________________________
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