• 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 lessen amount of code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using bindings to lessen amount of code


  • Subject: Re: Using bindings to lessen amount of code
  • From: email@hidden
  • Date: Tue, 14 Dec 2010 23:23:02 -0500

On Dec 13, 2010, at 12:25 PM, Paul Johnson wrote:

> I want to obtain the value at a particular row and column in a table.
>
>
> I implemented the datasource protocol method
> tableView:objectValueForTableVColumn:row:
>
>
> In this method I return [[self.arrangedObjects valueForKey:@"symbol"]
> objectAtIndex:rowIndex].
>
>
> Is there a way to solely use bindings to accomplish this and not implement
> the datasource protocol method at all?


Yes. You create an NSArrayController and then bind each table column. See the appropriate examples here:

http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

HTH,
Dave

_______________________________________________

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: 
 >Using bindings to lessen amount of code (From: Paul Johnson <email@hidden>)

  • Prev by Date: Re: Call for People: CocoaHeads Silicon Valley
  • Next by Date: Re: Building a GUI for Terminal Applications
  • Previous by thread: Using bindings to lessen amount of code
  • Next by thread: assign property behaves differently from simple instance variable???
  • Index(es):
    • Date
    • Thread