Writing ° to text field
Posted: Sat Nov 26, 2016 4:05 pm
Not sure if this is a bug or not.
I'm writing a probing macro, and want to write a degree symbol (° --- alt + 248) to a textfield, but I'm seeing some strange results.
At first I tried using in the .ssf file:
AS3jog.Addfield("", "Arial", "right", 22, -16777216, 636, 307, 122, "showfieldnb", 0, 0, 20349, 1);
AS3jog.Filterfieldtext("0123456789.\\-°", 20349);
In my Constructor macro, I have:
readfield = exec.Readkey("2017_Fields", "20349", "0.0°");
AS3jog.Setfieldtext(readfield, 20349); // Set Edge Angle
When I start UCCNC, it works as expected, giving me this:
To test what would happen if when my macro writes to the field, I wrote a macro, M20998, with :
AS3jog.Setfieldtext("25.39°", 20349); // Set Edge Angle
When I run it from the MDI, I get this:
Removing:
AS3jog.Filterfieldtext("0123456789.\\-°", 20349);
doesn't seem to make any difference. ( At first this caused my M20998 to not execute from MDI, but now I can't repeat it )
Another related issue.
I had manually edited the key value in the profile to be "0.0°"
I have another macro to write the keys while I'm testing, using:
string fieldtext = AS3jog.Getfield (20349);
exec.Writekey("2017_Fields", "20349", fieldtext);
When this macro is run with field #20349 having "0.0°", the key is saved as:
20349=0.0°
While typing this message, I realized that I don't nee to save these values, so this is less of an issue for me. But still a bug imo.
It's not a big deal if these issues can't be fixed, but they seem like bugs.
Or maybe I just don't know what I'm doing?
I'm writing a probing macro, and want to write a degree symbol (° --- alt + 248) to a textfield, but I'm seeing some strange results.
At first I tried using in the .ssf file:
AS3jog.Addfield("", "Arial", "right", 22, -16777216, 636, 307, 122, "showfieldnb", 0, 0, 20349, 1);
AS3jog.Filterfieldtext("0123456789.\\-°", 20349);
In my Constructor macro, I have:
readfield = exec.Readkey("2017_Fields", "20349", "0.0°");
AS3jog.Setfieldtext(readfield, 20349); // Set Edge Angle
When I start UCCNC, it works as expected, giving me this:
To test what would happen if when my macro writes to the field, I wrote a macro, M20998, with :
AS3jog.Setfieldtext("25.39°", 20349); // Set Edge Angle
When I run it from the MDI, I get this:
Removing:
AS3jog.Filterfieldtext("0123456789.\\-°", 20349);
doesn't seem to make any difference. ( At first this caused my M20998 to not execute from MDI, but now I can't repeat it )
Another related issue.
I had manually edited the key value in the profile to be "0.0°"
I have another macro to write the keys while I'm testing, using:
string fieldtext = AS3jog.Getfield (20349);
exec.Writekey("2017_Fields", "20349", fieldtext);
When this macro is run with field #20349 having "0.0°", the key is saved as:
20349=0.0°
While typing this message, I realized that I don't nee to save these values, so this is less of an issue for me. But still a bug imo.
It's not a big deal if these issues can't be fixed, but they seem like bugs.
Or maybe I just don't know what I'm doing?