Can I do this with call_procedure/call_function, or do I have to use execute? [message #50203] |
Mon, 18 September 2006 11:44 |
Braedley
Messages: 57 Registered: September 2006
|
Member |
|
|
I posted this recently in IDL only group, but to no avail, so I'll try
here now.
In a widget program, I have a pseudo command line. When an event is
triggered for this command line, the contents of the line are passed to
the handler (obviously as a string). That string may contain something
like:
print, f_samp
in which case, I would like the program to display the value for f_samp
in an output text widget, much the same way that entering the same
command into the IDLDE command line prints the value to the command
output window. The code to do this with execute is fairly easy,
namely:
executed=execute('widget_control, output_text_widget, $
/append, set_value=' + commands[1], 0, 0)
where commands is the value returned after performing strsplit on the
input string with space and comma delimiters (in this case, f_samp).
What I'm wondering is, since I want this particular piece of code to
run on a computer with only a copy of the virtual machine installed,
can I acomplish the same feat with only using call_procedure and or
call_function?
As a side note, the following will not work:
call_procedure, 'widget_control', output_text_widget, $
/append, set_value=commands[1]
That will just print f_samp, not the value of f_samp.
|
|
|