Re: NSObjectController, content outlet and content object question
Re: NSObjectController, content outlet and content object question
- Subject: Re: NSObjectController, content outlet and content object question
- From: Kevin Cathey <email@hidden>
- Date: Tue, 30 Jun 2009 09:42:28 -0700
Michael,
In IB, Bind the textField's and Slider's values to the model Key
Path "selection.number".
What are you binding to here? The object controller?
Connect the NSOjectController's outlet ( cntrl-drag to foo).
You have an outlet on "Foo" for the Object Controller?
Another question, for the NSObjectController, do you have the check-
box "Prepares Content" turned on in the inspector?
Kevin
On 29 Jun 2009, at 15:23, Michael de Haan wrote:
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
_______________________________________________
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