Re: Overriding v alueForKeyPath

2008-07-09 Thread Laurent Cerveau
Hi Hamish Thanks for the suggestion : I did in fact sit with a collegue and he also forced me to look at the other side (KVO ) and we kind of found a way Basically the order of calling is valueForKey for the first part of the "KV path" which goes in valueForUndefinedKey and if this "one d

Re: Overriding v alueForKeyPath

2008-07-09 Thread Hamish Allan
On Wed, Jul 9, 2008 at 2:39 PM, Laurent Cerveau <[EMAIL PROTECTED]> wrote: > Apparently what is happening is that the keyPath is decomposed, each object > is verified to be KVC compliant for the appropriate subPath and here we go : > nothing unexpected if I refer to the doc except that..the part I

Overriding v alueForKeyPath

2008-07-09 Thread Laurent Cerveau
Hi I am trying to us KVC in a way that it allows me to add an accessor semantic to an object so that it can answer to simple valueForKeyPah call. For example I want to be able to write [myObject valueForKeyPath:@"texts.title.en"] which would give me the english version of the title of m