• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[SOLVED] Re: Setting up bindings using GC and properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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


References: 
 >Setting up bindings using GC and properties (From: Sam Stigler <email@hidden>)
 >Re: Setting up bindings using GC and properties (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: Why initialize the menubar without Interface Builder
  • Next by Date: Re: Garbage collection, core data, and tight loops
  • Previous by thread: Re: Setting up bindings using GC and properties
  • Next by thread: [WebFrame url] -- How to get the initial URL from WebView or WebFrame?
  • Index(es):
    • Date
    • Thread