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

Home » Public Forums » archive » Re: working with restored values
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: working with restored values [message #11132 is a reply to message #11131] Mon, 02 March 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Cathy Campo (campo@gav.gat.com) writes:

> I am restoring a large save file, and displaying some of the
> variable names to the user to choose from in a droplist.
>
> restore, 'junk.sav'
> help, output=tmpstr
> varlist = strarr(5)
> varlist = tmpstr(0:4)
> widget_control, droplist, set_value=varlist
>
> i would like to save the actual values of the variables in a pointer
> array or structure. (have this be the uvalue of the droplist?)
> but how would i do this?
>
> later i would be using the pointer array or structure in the event
> loop of the droplist to do calculations with the value chosen.

I presume from this that you do NOT know the names of the
variables in advance. I would try something like this:

varValues = FltArr(5)
For j=0,4 DO ok = Execute('varValues[j] = ' + varlist[j])
Widget_Control, droplist, Set_Value=varlist, Set_UValue=varValues

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: mean and sdev
Next Topic: working with restored values

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

Current Time: Sat Nov 29 09:18:43 PST 2025

Total time taken to generate the page: 0.40166 seconds