Skip navigation.
 
mlRe: Bindings for NSTextFields
FROM : Scott Stevenson
DATE : Sun Oct 17 23:58:40 2004

On Oct 17, 2004, at 4:59 AM, Bernd Carl wrote:

> I have some questions about bindings.
> - Is it possible to have an NSMutableDictionary connected to two
> NSTextFields that are bound to each other? What it does is this: One
> TF is
> the key, the other the value. Whenever a key is entered, it should be
> checked for existance or added if it is new.


Binding to dictionary keys is difficult. You're probably better off
doing that part manually. It is, however, easy enough to bind the
*value* field to a key like:

   controller.theDictionary.userSuppliedKey

And implement something like:

   - (id) userSuppliedKey
   {
       return [keyTextField stringValue];
   }


Hope that helps.

    - Scott


--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]

Related mailsAuthorDate
mlBindings for NSTextFields Bernd Carl Oct 17, 13:59
mlRe: Bindings for NSTextFields Scott Stevenson Oct 17, 23:58
mlRe: Bindings for NSTextFields Tim Lucas Oct 18, 01:37