• 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
Re: NSController, currentDocument
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSController, currentDocument


  • Subject: Re: NSController, currentDocument
  • From: mmalcolm crawford <email@hidden>
  • Date: Wed, 5 Nov 2003 15:44:55 -0800

On Nov 5, 2003, at 9:17 AM, Marco Binder wrote:

Scott, would something like this work: bind the palette Ui items to the shared app with a keypath of mainWindow.document.arrayController.selection.desiredProperty?

Yes, this is an easy way to do inspectors...

(if, of course, the document has an outlet connected to the arrayController)

The generic answer to this is "Yes". Basically you can follow any key path.
Perhaps less intuitively, this includes keypaths with more than one array, such as:
array1.array2.value2
e.g.
children.pets.name
This will get you back an array of *all* children's pets' names.
Note *all*, since this may include duplicates. Then you can start thinking about the array operators:
@distinctUnionOfObjects.children.pets.name
...

See:
<http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/ArrayOperators.html>

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: NSController, currentDocument
      • From: Marco Binder <email@hidden>
References: 
 >NSController, currentDocument (From: Raphael Sebbe <email@hidden>)
 >Re: NSController, currentDocument (From: Scott Anguish <email@hidden>)
 >Re: NSController, currentDocument (From: Marco Binder <email@hidden>)

  • Prev by Date: Re: Super Newbie
  • Next by Date: window position autosave not working...
  • Previous by thread: Re: NSController, currentDocument
  • Next by thread: Re: NSController, currentDocument
  • Index(es):
    • Date
    • Thread