Is there a way to bind an ivar to the currently selected object of a list which 
is being represented in an NSTableView via bindings?  Unfortunately there does 
not seem to be a "selectedObject" key (though there is one for 
"selectedObjects").  Binding to the controller's "selection" doesn't really 
work as I'd expect and even if it did, I'd only be getting back a proxy object 
- which negates the purpose for which I want to use it, which is to call 
methods on the object.  I had put in a hack which observes changes in 
selection, gets the selectedObjects list, checks for a count > 0, grabs the 
first and stuffs it into the ivar, etc. but not only does that feel really 
hackish, but doesn't always work. 

This would seem to be a pretty simple thing to want to do (i.e. present a list 
of objects, do things to/with the currently selected object) but I'm at 
somewhat of a loss to understand what I'm doing wrong.   
_______________________________________________

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

Reply via email to