comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: fsc_field double
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: fsc_field double [message #64926 is a reply to message #64925] Thu, 05 February 2009 04:33 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Feb 5, 8:51 am, "AndiBif...@googlemail.com"
<AndiBif...@googlemail.com> wrote:
> Hi everybody,
>
> i am using david fannings fsc_field. I initialize the field in the
> following way
>
> param_text = fsc_field(textbase,title=param_labels(i), value = double
> (0.0),Decimal=2,LabelSize= 55,/noedit,xsize=9,$
>                                  uname = param_labels(i), /highlight,/frame,/
> cr_only,uvalue=i,event_pro='setparam')
>
> if a user selects a certain option in my gui the fields should become
> editable and set to default values defined as double default = double
> (1000) e.g.
>
> textID = widget_info(event.top,find_by_uname=param_labels(i))
>  widget_control, textID, set_value=default, editable=editable
>
> However even though i initialized the field with a double idl
> complains that it is unable to convert double to string.
>
> WIDGET_CONTROL: String expression required in this context: DEFAULT
>
> Since the field is not set to a different value before i don't
> understand what is going wrong here
>
> Thx
> Andi

Hi Andi,

is there anything stopping you from converting to string yourself?
widget_control, textID, set_value=string(default), editable=editable

I also notice that fsc_field() compiles a file called dbltostr.pro,
make sure you have this in your !Path.

You may be expecting too much of IDL if you're asking it to know what
values it can and can't convert to strings without being told
specifically! :-)

Regards,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: newbie here
Next Topic: Editing data in an existing HDF5 file and rewriting the fixed file, in IDL

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 07:07:03 PDT 2025

Total time taken to generate the page: 1.16999 seconds