Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
Fred Knight (knight@ll.mit.edu) asks: > More generally, do others want simultaneous input to widgets and the command > line like I do? I usually don't want to build all the capabilities I want into > a widget and usually avoid using them. Instead, I use the normal command input > with display to windows, with only brief work with widgets to perform specific > tasks. No doubt others who are doing production runs or many similar tasks > operate more with widgets. One way to satisfy me would be to have a command > line widget, which could be part of any larger widget. I have tried versions > of such a widget using an editable text widget with commands executed using the > execute function. However, the output is misdirected and variables are not > available unless they are in common or are created beforehand. Possibly the > new debugger for X windows will be a partial solution. In summary, I have two > points for discussion. > 1) I wonder whether others want simultaneous operation with a widget > and the command line. > 2) I suggest that creating a command-line widget would satisfy my needs. I certainly would like this capability. I have built a few IDL widget applications which are often used by non-IDL-literate operators. For debugging purposes I have needed simultaneous command line input, and so I wrote the following crude procedure, called from a widget menu. The output goes to the right place; variables are available just as they are between any two IDL procedures. I have also written a procedure to create a DECterm for interactive DCL. Write me if you want a copy of the code. > Fred > -- > =Fred Knight (knight@ll.mit.edu) (617) 981-2027 > C-483\\MIT Lincoln Laboratory\\244 Wood Street\\Lexington, MA 02173 pro idl_command ; escape (from Xmanager event loop) to accept IDL command on_ioerror, bail_out print, '' print, '' print, 'Enter interactive IDL commands after ":". ' + $ 'Enter "EXIT" to return to application.' print, 'Do NOT spawn DCL commands. Use DCL Commands option instead.' print, 'Command line editing is NOT available.' print, '' done = 0 repeat begin print, !prompt, format = '(a, $)' command = '' read, command if strupcase( command) eq 'EXIT' then begin done = 1 print, 'Click on your application widget to continue.' print, '' endif else status = execute( command) endrep until done eq 1 bail_out: end