• 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: Data Source ignored after binding sortDescriptors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data Source ignored after binding sortDescriptors


  • Subject: Re: Data Source ignored after binding sortDescriptors
  • From: Allen Smith <email@hidden>
  • Date: Tue, 9 Oct 2007 16:34:23 -0700

On Oct 9, 2007, at 2:37 PM, Keary Suska wrote:

on 10/9/07 12:09 PM, email@hidden purportedly said:

After establishing a binding for an NSTableView's sortDescriptors, my
data source methods -numberOfRowsInTableView: and -
tableView:objectValueForTableColumn:row: stop getting called. But I
haven't bound the table view's content or any columns in the table
view--just the sortDescriptors.. Is it really impossible to use a
data source to supply table values and use bindings to synchronize
the sort descriptors?

There are certain "automagical" bindings that occur when setting certain
bindings (particularly column value bindings), and you may be running into
one of these.

I presume you are referring to the bindings the documentation vaguely refers to as "being created automatically when the initial NSTableColumn binding is made." But it must be more complicated than that; I never bound any table columns. Furthermore, when I log [tableView infoForBinding:@"content"], etc., I get nil. Only the binding I actually established returns any information.


Why not set an outlet and use -setSortDescriptors: instead?

Because bindings are supposed to save me the bother of writing glue code to synchronize shared data, which in this case happens to be my sort descriptors and selection indexes. But it would appear I have stumbled upon a case where bindings decide to do more than advertised.


Allen



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


References: 
 >Re: Data Source ignored after binding sortDescriptors (From: Keary Suska <email@hidden>)

  • Prev by Date: Re: Drag an drop in a custom NSView
  • Next by Date: Re: Getting Carbon Volume Mount Events in a Cocoa (Core Foundation) process
  • Previous by thread: Re: Data Source ignored after binding sortDescriptors
  • Next by thread: Re: Control/Option keys both set "control" modifier flag in NSEvent- solved (sort of)
  • Index(es):
    • Date
    • Thread