Hi all,
Hope everyone has had a terrific New Year.
I have asked something similar before, but the fact that I am coming back to this again, tells me that I am missing something. So, let me ask this in a slightly different way.
Firstly, let me say that the app that demos this works fine.
A view, with 2 controls ( an NSLabel and an NSSlider).
A model class ( called MyModel) with a single float property called "myFloat".
An NSObjectController.
The ObjectController and MyModel are both represented in the Nib file.
Bindings:
Both the "value" bindings of NSLabel and NSSlider are bound to the ControllerKey: selection and Model Key Path: myFloat of the NSObjectController, as I would expect.
Binding of the controller:
The "Content Object" is bound to the model key path: self, and in IB, after this has been checked, Content Object has in parenthesis after it (MyModel.self).
(I know that I could have set the content object another way, but I am interested in understanding this better)
OK...now the question.
I know that "selection" of an NSObjectController is always the Content Object, so the Control Bindings "sort of" make sense. But, I keep getting flummoxed by the use of "self" in the model key path. ( say vs MyModel.myfloat )
As part of this query, what method call would IB send to the model to establish this binding? Perhaps that would clarify the use of "self".
Thanks in advance....and apologies if this revisits an old issue.
Hope everyone has had a terrific New Year.
I have asked something similar before, but the fact that I am coming back to this again, tells me that I am missing something. So, let me ask this in a slightly different way.
Firstly, let me say that the app that demos this works fine.
A view, with 2 controls ( an NSLabel and an NSSlider).
A model class ( called MyModel) with a single float property called "myFloat".
An NSObjectController.
The ObjectController and MyModel are both represented in the Nib file.
Bindings:
Both the "value" bindings of NSLabel and NSSlider are bound to the ControllerKey: selection and Model Key Path: myFloat of the NSObjectController, as I would expect.
Binding of the controller:
The "Content Object" is bound to the model key path: self, and in IB, after this has been checked, Content Object has in parenthesis after it (MyModel.self).
(I know that I could have set the content object another way, but I am interested in understanding this better)
OK...now the question.
I know that "selection" of an NSObjectController is always the Content Object, so the Control Bindings "sort of" make sense. But, I keep getting flummoxed by the use of "self" in the model key path. ( say vs MyModel.myfloat )
As part of this query, what method call would IB send to the model to establish this binding? Perhaps that would clarify the use of "self".
Thanks in advance....and apologies if this revisits an old issue.