X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 04 Dec 2006 10:22 AM by  anon
Passing FLTARR through text widget
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
04 Dec 2006 10:22 AM
    Hi, I am new to widgets. I am entering floating point numbers in my text widget, but once they have passed through event handling they are returned as integer values. Does this sound like something familiar to you that I may be missing? Thanks

    Deleted User



    New Member


    Posts:
    New Member


    --
    04 Dec 2006 10:22 AM
    First of all, all numeric values returned to IDL through a text widget arrive as a string array datatype. That is, if you enter in a text box: 1.2345 then the commands: widget_control, wText, GET_VALUE=text help, text should reveal the following about the 'text' variable TEXT STRING = Array[1] If you subsequently have a call like: myFirstFloatEntry = float(text[0]) help, myFirstFloatEntry you should see the following datatype and value assigned to the 'myFirstFloatEntry' variable: MYFIRSTFLOATENTRY FLOAT = 1.23435 Knowing this now, can you see where your capture of your numeric entries in your WIDGET_TEXT is going wrong? James Jones
    You are not authorized to post a reply.