Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using bindings to make an NSPopupButton to assign an array filter predicate




On Dec 18, 2006, at 3:52 PM, James Farwell wrote:
Yeah, the bi-directional KVO relationship is much clearer to me now as a result of my mistake.

KVO is not "bi-directional".
Cocoa bindings uses KVO to send information Model ->> Controller ->> View, and KVC to send information View -> Controller -> Model, as described here:
<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaBindings/Concepts/HowDoBindingsWork.html >



It does make perfect sense that binding NSPopupButton's selectedIndex to NSArrayController's selectionIndex permits the popup button to not only display the selection, but also change it.

The table view thing is still fairly confusing though because I find it rather unintuitive that binding a column of a table to a particular property of an array controller actually ends up binding the selection of the entire table to the selection of the entire array controller. I haven't been able to actually find documentation that discusses it anywhere, and I'd think it'd be rather important to mention since it makes things like binding multiple tables to a single array controller a "Bad Thing" whereas it seems perfectly reasonable if you don't know about that particular quirk. Do you know of an official Apple document that actually details this interaction and/or NSTableBinder?

<http://developer.apple.com/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSTableView.html >

"Typically, the content binding is created automatically when the initial NSTableColumn binding is made, binding to the column's NSArrayController."

It would be worth, though, filing an enhancement request to have this described more prominently elsewhere in the documentation.


Also, if I were interested in filing a bug against the documentation, what system would I use to do it?

In addition to bugreport.apple.com, you can use the feedback link at the bottom of any reference page in the documentation ("Did this document help you?" ...).

mmalc

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >Re: Using bindings to make an NSPopupButton to assign an array filter predicate (From: Matt Neuburg <email@hidden>)
 >Re: Using bindings to make an NSPopupButton to assign an array filter predicate (From: James Farwell <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.