• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Using bindings to make an NSPopupButton to assign an array filter predicate
[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


  • Subject: Re: Using bindings to make an NSPopupButton to assign an array filter predicate
  • From: mmalc crawford <email@hidden>
  • Date: Tue, 19 Dec 2006 10:14:20 -0800


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:
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>)

  • Prev by Date: Re: capturing user reaction times in msecs
  • Next by Date: Re: managedObjectContext.hasChanges not binding right to non-menu UI items?
  • Previous by thread: Re: Using bindings to make an NSPopupButton to assign an array filter predicate
  • Next by thread: Re: Using bindings to make an NSPopupButton to assign an array filter predicate
  • Index(es):
    • Date
    • Thread