FROM : Philip Mötteli
DATE : Fri Nov 23 19:33:25 2007
Am 23.11.2007 um 19:09 schrieb Sherm Pendley:
> On Nov 23, 2007, at 11:50 AM, Paul Sargent wrote:
>
>>> KVO is not based on the internals of an object (which is assumed
>>> to be hidden), and it does not access hiddden internals. KVO is
>>> based on KVC and uses accessors.
>>>
>> To expand a bit, my mental model of it is (and this could be wrong):
>>
>> No Observing:
>>
>> ObjA ----setBlah:----> ObjB
>>
>> Observing:
>>
>> ObjA ----setBlah:----> ProxyForB -----setBlah:----> ObjB
>> |
>> |
>> \-------blahChanged:---> Observer
>>
>> i.e. When the observer registers a proxy is inserted in the chain.
>> The message is intercepted by the proxy and it notifies the Observer.
> When you observe an object, a new subclass is created that inherits
> from that object's class,
So Apple has the same solution as GNUstep.
It actually doesn't implement any method forwarding, but uses
objc_msgsend()'s.
Thanks
DATE : Fri Nov 23 19:33:25 2007
Am 23.11.2007 um 19:09 schrieb Sherm Pendley:
> On Nov 23, 2007, at 11:50 AM, Paul Sargent wrote:
>
>>> KVO is not based on the internals of an object (which is assumed
>>> to be hidden), and it does not access hiddden internals. KVO is
>>> based on KVC and uses accessors.
>>>
>> To expand a bit, my mental model of it is (and this could be wrong):
>>
>> No Observing:
>>
>> ObjA ----setBlah:----> ObjB
>>
>> Observing:
>>
>> ObjA ----setBlah:----> ProxyForB -----setBlah:----> ObjB
>> |
>> |
>> \-------blahChanged:---> Observer
>>
>> i.e. When the observer registers a proxy is inserted in the chain.
>> The message is intercepted by the proxy and it notifies the Observer.
> When you observe an object, a new subclass is created that inherits
> from that object's class,
So Apple has the same solution as GNUstep.
It actually doesn't implement any method forwarding, but uses
objc_msgsend()'s.
Thanks






Cocoa mail archive

