NSObjectController, content outlet and content object question
NSObjectController, content outlet and content object question
- Subject: NSObjectController, content outlet and content object question
- From: Michael de Haan <email@hidden>
- Date: Mon, 29 Jun 2009 15:23:06 -0700
May I indulge the group with an issue I have been trying to understand
for a few days. I have tried to read the extensive literature and
correspondence to the group, but so far have not seen an answer that
is specific to this question.
Given this simple app....which keeps a slider and textField's value
synchronized.
1) View consisting of a slider and a textField
2) Model (Foo) with a single property "number"
3) NSObjectController
I am able to use 2 configurations to get the app to work.
Config (1).
In IB, Bind the textField's and Slider's values to the model Key Path
"selection.number".
Connect the NSOjectController's outlet ( cntrl-drag to foo).
Config (2)
As config (1) ...first line only.... now Bind NSObjectController to
Foo, with the model Key Path = self.
Could someone please explain why both work, and any reason for
choosing one over the other.
Thanks in advance.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden