[SOLVED] Re: Setting up bindings using GC and properties
[SOLVED] Re: Setting up bindings using GC and properties
- Subject: [SOLVED] Re: Setting up bindings using GC and properties
- From: Sam Stigler <email@hidden>
- Date: Sat, 3 Nov 2007 20:44:26 -0700
Oh, I see... thanks! I didn't realize it was a subclass of
NSArrayController; I was going under the assumption its selection
binding was the same as that for NSObjectController (which from
reading the documentation I now realize wouldn't have made sense even
if it was true).
I fixed my binding as per your suggestion, and have now fixed the
problem.
Thanks again,
Sam
On Nov 3, 2007, at 5:37 AM, mmalc crawford wrote:
[..........]
Per the documentation:
"The arrangedObjects method returns an array of objects that
implement the NSDictionaryControllerKeyValuePair informal protocol.
User interface controls are bound to the arranged objects array
using key paths such as: arrangedObjects.key (displays the key
name), arrangedObjects.value (displays the value for the key), or
arrangedObjects.localizedKey (displays the localized key name). See
NSDictionaryControllerKeyValuePair Protocol Reference for more
information."
<http://developer.apple.com/documentation/Cocoa/Reference/NSDictionaryController_Class/Introduction/Introduction.html
>
so 'selection' will return the currently-selected key-value pair,
with keys defined by the NSDictionaryControllerKeyValuePair protocol.
If you want to display the value for bonjourOnOff, bind to [File's
Owner].serverStatus.bonjourOnOff
(assuming that File's Owner is the object for which you gave the
init method).
mmalc
_______________________________________________
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