String to Number to String

I’m a long-time Applescript Studio user and I’m new to ASOC (just upgraded to 10.6).

I have a series of NSTextFields with number formatters attached to them. I can convert the contents of the NSTextFields to reals. After some computations I’d like to put the result into a NSTextField with a formatter attached to it but I can’t figure out how to do that. This is the error that gets generated:

2011-02-27 18:33:39.559 HOS Calculator[455:a0f] -[NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0x2005a2300
2011-02-27 18:33:39.568 HOS Calculator[455:a0f] *** -[HOS_CalculatorAppDelegate CalcHoursUsed:]: -[NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0x2005a2300 (error -10000)

Thanks in advance,
Brad Bumgarner

WoHoo! I already figured it out. Instead of using:

setStringValue_

use:

setFloatValue_

I feel like I have to learn everything all over again! :lol: I have a feeling it will be worth it though in the long run.

Brad Bumgarner