PDA

View Full Version : Carbon/TextBox Input


Sta7ic
2002.07.03, 07:05 PM
Hoi. I'm trying to make an editing tool that takes numbers out of the Text Box controls, but all I find looking at GetControlData() is a Unicode and a CFString output. Since I'm not going for straight string manipulation, is there a CF atof() equivalent, or another way to access the contents of a control that yields numerical output?

Thanks,
Sta7ic

GoodDoug
2002.07.03, 07:17 PM
Look in the CFString.h header. There is a function in there with the signature:
double CFStringGetDoubleValue(CFStringRef str);

And CFStrings are the best way to access control values, as they will translate well when moved to other languages or newer OS's come out.