On 30 Sep 2009, at 13:31, Timothy Reaves wrote:
On Sep 29, 2009, at 7:10 AM, "Timothy Reaves"
<trea...@silverfieldstech.com
wrote:
What makes you think you can? Logically, you shouldn't be
able. I'd
imagine selectedObjects is always going to return an index set; it'd
just be empty with no selection. I did try comparing it to
NSNoSelectionMarker just in case, and that doesn't work.
Perhaps instead of imagining it would be more helpful to read the
documentation. -[NSObjectController selectedObjects] returns the
actual objects.
You also don't seem to understand how bindings work. Even if -
selectedObjects did return an NSIndexPath, it's a KVO-compliant
property and therefore perfectly suitable for binding to.
--Kyle Sluder
I mixed up selectedIndexes. So, yes, it does return objects.
However, it does not in fact return the actual objects. It returns
proxies. Which is what I said in my original post. So even if there
are no selected objects, you get back a non-empty array.
-[NSArrayController selectedObjects] does not return proxies, it
returns the real thing. On the other hand:
-[NSArrayController selection] returns a proxy that represents the
overall selection
NSTreeController uses proxies to represent its tree structure. On
10.5+ this is exposed as NSTreeNode.
I think there is some confusion here between these things.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com