Re: Display group wierdness
Re: Display group wierdness
- Subject: Re: Display group wierdness
- From: Art Isbell <email@hidden>
- Date: Tue, 11 Jul 2006 17:05:06 -1000
On Jul 11, 2006, at 4:46 PM, John Larson wrote:
Since queryMatch is of type NSMutableDictionary, it doesn't have a
field named agent_person that the compiler can decode. Enter key-
value coding, the typecasting nightmare, but quick and dirty coding
dream. agentDisplayGroup.queryMatch.takeValueForKeyPath("Agent
Name", "agent_person.surname"); should do the trick.
But WODisplayGroup doesn't have a "queryMatch" public instance
variable, so agentDisplayGroup.queryMatch should generate a compiler
error; agentDisplayGroup.queryMatch() should work.
If there is still an error with your key path, you will get a run
time error.
This is a downside to key-value coding that can be minimized by
configuring eogenerator to define String constants for every class
property name. Then instead of using error-prone property name
strings as arguments in key-value coding methods, use these String
constants instead.
Aloha,
Art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden