• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to observe and bind (KVO/KVB) to a value generated at runtime...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: How to observe and bind (KVO/KVB) to a value generated at runtime...
      • From: Camillo Lugaresi <email@hidden>
  • Prev by Date: Re: Progmatically Caching Objects from a CoreData SQLite Store?
  • Next by Date: Link & Table Cursors in NSTextView
  • Previous by thread: Re: Progmatically Caching Objects from a CoreData SQLite Store?
  • Next by thread: Re: How to observe and bind (KVO/KVB) to a value generated at runtime...
  • Index(es):
    • Date
    • Thread