• 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: Calculations in a tableview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calculations in a tableview


  • Subject: Re: Calculations in a tableview
  • From: Steve Steinitz <email@hidden>
  • Date: Fri, 29 Jul 2011 12:17:54 +1000

Hi,

On 29 Jul 11, at 10:51am, email@hidden wrote:

> For example, lets say I have a tableview with 3 columns: quantity, unit price and total. I want to calculate total using (quantity * unit price). Pretty simple using a datasource but I've no idea how to do that with bindings (using an NSArrayController).
>
> Any pointer to an example of this would be greatly appreciated.

(Using Core Data with tables) I just write a method to calculate quantity * price and then bind the third column to that.

Cheers,

Steve_______________________________________________

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

  • Prev by Date: Re: Calculations in a tableview
  • Next by Date: Re: Lion doesn't like tricky.key.paths in bindings?
  • Previous by thread: Re: Calculations in a tableview
  • Next by thread: drawRect not getting called problem solved
  • Index(es):
    • Date
    • Thread