[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem executing code "saved" using SAVE command



Thomas S. Spisz writes:

First of all, Tom, please turn off your HTML 
markup. Not many of us will brave the distraction
to answer questions with all this nonsense in it. :-)

> <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
> <html>
> &nbsp;
> <br>I have a problem with IDL code that I "saved" (<i>compiled</i>) using
> the SAVE command -- it doesn't execute the same as the same code run directly
> from the IDL Development Environment.&nbsp; (By the way, I do realize that
> you can't really <i>compile</i> IDL code.)&nbsp; Let me explain the situation.&nbsp;
> First of all, I'm on Windows NT machine, and IDL 5.4.
> <p>I have a set of procedures with one procedure called 'main_gui.pro'
> that is the main procedure that calls other procedures.&nbsp; I can enter
> IDL, compile 'main_gui.pro' and all it's necessary procedures.&nbsp; Then
> type 'resolve_all', and run it -- it does beautifully.
> <p>However, if I enter IDL, compile 'main_gui.pro' and all it's necessary
> procedures.&nbsp; Then type 'resolve_all'.&nbsp; Then type
> <br>"save, filename='c:\main_gui.sav', /routines"&nbsp; which saves everything
> into that single binary file.&nbsp; When I double-click on 'main_gui.sav',
> it does execute but not correctly.&nbsp; It leaves out certain plotting
> commands and has some widget errors that shouldn't occur and do not occur
> if run directly from IDL Development Environment as stated in previous
> paragraph.
> <p>The real bummer is that I cannot debug this problem because when I execute
> the 'main_gui.sav' file, then IDL is in run-time mode.&nbsp; Therefore,
> I don't see the output log and cannot use any of the debug capabilities
> in the IDL Development Environment.
> <p>Any knowledge or help with this problem is greatly appreciated.
> <p>Tom Spisz
> <br>Johns Hopkins University Applied Physics Laboratory
> <br>11100 Johns Hopkins Road
> <br>Laurel, MD&nbsp; 20723-6099
> <br>240-228-7260
> <br>tom.spisz@jhuapl.edu
> <br>&nbsp;
> <br>&nbsp;
> <br>&nbsp;</html>

It is possible that you have objects in your code.
Those objects will need to be compiled separately,
as RESOLVE_ALL won't see them. 

And in the back of my mind (in the reptilian
portion, I think) I vaguely remember a problem
saving a save file directly on the hard drive.
Did this involve a space in the filename...? 
I can't remember and can't seem to find a reference
to it. But try saving this into a folder on your
C drive and see if this works.

Cheers,

David
-- 
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155