Bindings/Observation Question
Bindings/Observation Question
- Subject: Bindings/Observation Question
- From: Karl Goiser <email@hidden>
- Date: Thu, 23 Mar 2006 09:51:36 +1100
Hello,
I am just starting in Bindings (I know, better late than never...).
I have some preferences which contain an array of dictionaries
containing attributes including an array of dictionaries. The outer
array allows selection of a group of preferences, like a 'theme'.
The idea is that the user selects a theme in the preferences window,
which then reveals the preferences for that theme as well as changing
the application itself. I would like to have changes to the selected
theme update the application 'live'.
To do this using Bindings, I am thinking of a table view and
NSArrayController for the outer array, and selection of a theme sets
a variable whose NSObjectController then displays the particular
preferences, and another table view and NSArrayController handles the
inner array..
(Is this a good scenario?)
The question: how does the rest of the application become aware of
the changes to the preferences - especially the attributes in the
inner dictionary? KVO? If so, wouldn't I then have to observe every
attribute within the theme, its array as well as every attribute of
the inner dictionary, as well as being aware of additions to and
deletions from the inner array?
Is there a better way?
Could somebody point me to example code that might be relevant?
Thanks in advance!!!
Karl
_______________________________________________
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