• 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: NSTableView, bindings and datasource
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView, bindings and datasource


  • Subject: Re: NSTableView, bindings and datasource
  • From: Corbin Dunn <email@hidden>
  • Date: Mon, 25 Aug 2008 08:38:53 -0700


On Aug 24, 2008, at 11:55 PM, Pierre Chatelier wrote:

Hello,

I was wondering something...
I have an NSTableView which is automatically filled by binding. So, I did not set any dataSource.
But I want to implement "tableView:writeRowsWithIndexes:toPasteboard:", which is a dataSource method. So, I set some object to be the dataSource, implementing the method.
At run-time, it complains that the dataSource should implement numberOfRowsInTableView:. I had to implement such a method, but the return value remains unused since the bindings are responsible for feeding.


My question is : yes, it works, but what is logical to do ?

Yes -- it is; we are working on removing the warning if you use bindings.


Should I also implement dummy "tableview:objectValueForTableColumn:row:" and others methods that are theoretically required for a datasource, but practically unused when using bindings ?

Yes, just that one and -numberOfRowsInTableView.

--corbin
_______________________________________________

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: 
 >NSTableView, bindings and datasource (From: Pierre Chatelier <email@hidden>)

  • Prev by Date: Re: 64-bit => Objc 2.0????
  • Next by Date: Re: *** -[NSSavePanel _blocksActionWhenModal:]: message sent to deallocated instance 0x15a05e50
  • Previous by thread: NSTableView, bindings and datasource
  • Next by thread: Problems running bannersample example project.
  • Index(es):
    • Date
    • Thread