NaN Problem Adding Numbers from NSTableView
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