Win32: number to text box
- Posted by Sim <simadan at Hotmail.com> Oct 17, 2001
- 430 views
Hello, Yesterday, I asked how to convert a number from a textbox (SLE) to an atom. I followed Dan Moyer's adviced and used value(). (I'm creating a calculator using the Win32Lib.ew.) Now that I have computed a numerical number, I need to convert the number/atom into a string/text and then output that string/text to a textbox (SLE). I haven't found any library functions that can help me with the conversion. Anyone have any ideas? This is part of the error message I got when I tried to multiply 5 with 6 and then put the answer (30) in a text box (SLE): D:\EUPHORIA\include\Win32lib.ew:6865 in procedure setText() type_check failure, s is 25 pID = 7 s = 25 ptr = <no value> result = <no value> id = <no value> lPart = <no value> If s is a sequence/string, then shouldn't "s" be displayed in the textbox when I use setText()? Here is the code: atom answer1, num1, num2 --... some other code that works answer1 = num1 * num2 setText(tboxOut, answer1) I tried declaring "answer1" as a sequence, but when I clicked the button, the textbox was cleared for some odd reason. My appologies if you are not used to the naming conventions I've used: I'm used to using Visual Basic and Window's naming convention. Thanks, Sim