How to observe and bind (KVO/KVB) to a value generated at runtime...
How to observe and bind (KVO/KVB) to a value generated at runtime...
- Subject: How to observe and bind (KVO/KVB) to a value generated at runtime...
- From: email@hidden
- Date: Fri, 24 Feb 2006 14:35:14 -0800
Title says it all.
I need to provide a proxy object that is KVB/KVO compliant for a key
not yet known until its requested.
I've implemented a proxy object that pipes set/Key values for Key
value coding, but when I return a proxy object
from an array index accessor (countOfItems/ItemAtIndex etc. style)
the table view wants to bind its text values to a key
not yet known. So when my proxy gets a undefinedValueForKey message
it checks if the object it wraps has a certain
conditions that it can take the value for that key, so I can return a
value or also set it.
The problem is that the following message occurs when returning my
proxy:
[<NSKeyValueArray 0x541b080> addObserver:forKeyPath:options:context:]
is not supported. Key path: order
So I'm wondering, since I cant "pipe" values back and forth to the
wrapped object when bindings are concerned, how can I allow the
table column or other item bind to the underlying (wrapped) value??
As an example, the wrapped object always has a variable called
"value," so what ever is sent or retrieved to the proxy, even if its
unknown,
I still want it to bridge to the wrapped object....... should I
override addObserver:forKeyPath:options:context: in the proxy and
pass it
to the wrapped object???
Any help is appreciated.
Andre
email@hidden
_______________________________________________
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