cancel
Showing results for 
Search instead for 
Did you mean: 

get decimal value from wildcard textbox

Emilmart
Senior

Hi everyone,

I have a textarea wilcard which display a decimal value

I'd like to convert this value into a decimal var.

double tmpVal = atof((const char*)wildcardText.getWildcard()) isn't getting the decimal number

thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
Alexandre RENOUX
Principal

Hello Emilmart,

It's actually difficult to convert proper numbers from a wildcard, especially decimal values.

A simple way to fix your problem is simply to store your float value in a "buffer"/variable. Because if the value is displayed with a TextArea, it means that your code already knew this value before giving it to the wildcard.

/Alexandre

View solution in original post

1 REPLY 1
Alexandre RENOUX
Principal

Hello Emilmart,

It's actually difficult to convert proper numbers from a wildcard, especially decimal values.

A simple way to fix your problem is simply to store your float value in a "buffer"/variable. Because if the value is displayed with a TextArea, it means that your code already knew this value before giving it to the wildcard.

/Alexandre