Question about KVC-compliance and bindings

2012-02-28 Thread Per Bull Holmen
Hi Suppose I want to make a controller, which allows a view to bind to the keyPath: mainBranch.subBranch.attribute There will be a large range of theoretical subBranch.attribute combinations, but only a few of these will actually be bound to by the user. Other combinations will therefore be

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Keary Suska
On Feb 28, 2012, at 8:24 AM, Per Bull Holmen wrote: Suppose I want to make a controller, which allows a view to bind to the keyPath: mainBranch.subBranch.attribute There will be a large range of theoretical subBranch.attribute combinations, but only a few of these will actually be bound

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Per Bull Holmen
Den 18:05 28. februar 2012 skrev Keary Suska cocoa-...@esoteritech.com følgende: On Feb 28, 2012, at 8:24 AM, Per Bull Holmen wrote: This all leads to a question, though, which is: what is the problem you are trying to solve? Is this a case of premature optimization? Why not just have the

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Mike Abdullah
On 28 Feb 2012, at 17:05, Keary Suska wrote: I find it more useful to focus on KVO (Key Value Observing) compliance rather than KVC compliance, as although KVC compliance ensures KVO compliance, the reverse is not always true. Whoah! Wrong way round! To be KVO-compliant, you must be

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Quincey Morris
On Feb 28, 2012, at 07:24 , Per Bull Holmen wrote: Suppose I want to make a controller, which allows a view to bind to the keyPath: mainBranch.subBranch.attribute There will be a large range of theoretical subBranch.attribute combinations, but only a few of these will actually be bound

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Per Bull Holmen
Den 20:24 28. februar 2012 skrev Quincey Morris quinceymor...@rivergatesoftware.com følgende: I don't think there's no shortcut. :) It's not clear from your description, but you seem to saying that there *is* a value object (of some custom class?) for mainBranch. And a subBranch object? In

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Keary Suska
On Feb 28, 2012, at 11:46 AM, Mike Abdullah wrote: On 28 Feb 2012, at 17:05, Keary Suska wrote: I find it more useful to focus on KVO (Key Value Observing) compliance rather than KVC compliance, as although KVC compliance ensures KVO compliance, the reverse is not always true. Whoah!

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Keary Suska
On Feb 28, 2012, at 10:47 AM, Per Bull Holmen wrote: Binding to the VALUES did still turn out pretty well now. But the Audio Unit plugin API also has a standardized way for Audio Units to give the hosts and GUI some static information about each parameter such as min/max value, readonly or

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Per Bull Holmen
Den 23:41 28. februar 2012 skrev Keary Suska cocoa-...@esoteritech.com følgende: I would say that there really isn't anything wrong with the controller knowing ahead of time what keys in the model will be needed by the UI. In fact, it needs to, and in fact does when you establish a binding.

Re: Question about KVC-compliance and bindings

2012-02-28 Thread Per Bull Holmen
Den 00:53 29. februar 2012 skrev Per Bull Holmen pbhol...@gmail.com følgende: Yes, it does know it when you establish a binding, I agree. That's what I am currently doing, in the controller's addObserver method, it registers the keys, and if there is a corresponding integer parameter ID for