Re: The problem with bindings
Re: The problem with bindings
- Subject: Re: The problem with bindings
- From: Allan Odgaard <email@hidden>
- Date: Sat, 31 Jul 2004 07:20:45 +0200
On 31. Jul 2004, at 1:34, Steve Sims wrote:
Let's take a couple of real examples here to illustrate what I'm after.
[...]
Okay, so you only want the cascade when explicitly doing:
[fontParams setValue:newWidth forKeyPath:@"size.width"];
But not when doing:
[[fontParams valueForKey:@"size"] setValue:newWidth forKey:@"width"];
I am not sure if you can always enforce the former to happen. For
example with the views which manage multiple values (menus/comboboxes,
tables and the matrix), there is both a content and a contentValues
binding, and I am quite sure the view will do something similar to the
latter line above -- though probably these views could be changed to
manually ensure that change notifications are sent for each component
in the key paths.
[...] Right now my UI works by binding to a derived value within my
data model, and I use manual observer notification in the setter
methods of the dependent keys.
Are you aware of setKeys:triggerChangeNotificationsForDependentKey:?
That should probably remove your need for manual observers.
--
http://macromates.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.