Re: NSController, currentDocument
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.