• 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
NaN Problem Adding Numbers from NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NaN Problem Adding Numbers from NSTableView


  • Subject: NaN Problem Adding Numbers from NSTableView
  • From: Philip Juel Borges <email@hidden>
  • Date: Wed, 21 Apr 2010 16:53:29 +0200

Hi,

I've googled this issue to no avail until now. In my application I have a tableview with 6 columns to enter numbers for statistic purposes. That works fine. Yet, I've run into a problem adding the numbers together. Under each column below the tableview I have placed an NSLabel to show the total amount. I bind that label under Value in the bindings panel like so:

Bind To: myArrayController
Controller Key: arrangedObjects
Model Key Path: email@hidden

But some times I need to leave a tableview cell blank and then it writes NaN in the label. If I type in 0 (zero) it adds up the numbers nicely. But I'd rather just leave the selection empty rather than typing in a zero.

Any ideas how to solve the NaN issue?

--Philip
_______________________________________________

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: NaN Problem Adding Numbers from NSTableView
      • From: Graham Cox <email@hidden>
  • Prev by Date: Determining preferred localizations
  • Next by Date: Re: Custom progress bar for QTMovie??
  • Previous by thread: Re: Determining preferred localizations
  • Next by thread: Re: NaN Problem Adding Numbers from NSTableView
  • Index(es):
    • Date
    • Thread