On May 8, 2012, at 12:27 AM, Quincey Morris wrote:

> P.S. Personally, I wouldn't bind to a NSArrayController like this, because it 
> just obscures the MVC lines of your app. The array controller is getting its 
> content from somewhere: from this view controller itself, from a window 
> controller, or from the app delegate. Assuming the last of these (based on 
> your description of the data as app-wide), then I'd give the app delegate a 
> "selectionIndexes" property (of type NSIndexSet*), bind the array 
> controller's "selectionIndexes" binding to this property in IB, and have the 
> view controller observe the app delegate "selectionIndexes" property instead 
> of the array controller "selectedObjects" property.
> 
> The rationale for this is that the array controller is merely a glue object 
> foisted on you by the bindings UI conventions, and the less your code needs 
> to know about it the better.


Hmmm, an indexset just gives me an index, how do I get the object from it that 
it belongs to? I think I still need to be able to access the NSArrayController 
(that feeds the NSTableView) for that?

Did I miss something?

- Koen.




_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to