• 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: Request for help in getting table View to reflect fetch results
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Request for help in getting table View to reflect fetch results


  • Subject: Re: Request for help in getting table View to reflect fetch results
  • From: mmalc crawford <email@hidden>
  • Date: Sun, 15 Jul 2007 10:11:31 -0700


On Jul 14, 2007, at 10:57 PM, Chris Hanson wrote:

So the question should really be "How can I connect my table view through some sort of controller to my model objects?"

There are a couple of ways you can do this, both fairly straightforward. You can bind the NSValueBinding of each of your table columns through an NSArrayController to the appropriate model objects, by binding the array controller's NSContentArrayBinding to a collection of model objects.
Or you can implement your own controller that conforms to the NSTableDataSource informal protocol, point it at a collection of model objects, and make it your table view's dataSource.


For a comparison of these approaches, see:
<http://developer.apple.com/samplecode/WithAndWithoutBindings/index.html >


mmalc

_______________________________________________

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


  • Follow-Ups:
    • Re: Request for help in getting table View to reflect fetch results
      • From: "Ernest Schaal" <email@hidden>
References: 
 >Request for help in getting table View to reflect fetch results (From: "Ernest Schaal" <email@hidden>)
 >Re: Request for help in getting table View to reflect fetch results (From: Chris Hanson <email@hidden>)

  • Prev by Date: Re: Request for help in getting table View to reflect fetch results
  • Next by Date: Window with frameAutosaveName moving
  • Previous by thread: Re: Request for help in getting table View to reflect fetch results
  • Next by thread: Re: Request for help in getting table View to reflect fetch results
  • Index(es):
    • Date
    • Thread