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

Re: problem executing code "saved" using SAVE command



"Thomas S. Spisz" wrote:
> 
> Sorry about the html -- didn't realize that.
> 
> Anyway, I tried your compile routine.  I was able to create the
> main_gui.sav file.  But it did not work because for some reason it
> didn't recognize one of my functions (although it was compiled).  One
> explaination (maybe) is that I don't have the procedures compiled in a
> strict order.  For instance, a procedure may use another procedure that
> was compiled after the first one.  Also, the 'print,main_gui_info()' did
> not work either.
> 
> Your suggestion of restoring the '.sav' file in the IDLDE was a good
> one.  I tried it.  Sure enough it works like it is supposed to.  So, I'm
> still stuck with a working version when running from IDLDE, but problems
> when running it as a run-time program.
> 
> thanks anyway.
>   --tom


Here is my next idea

If you store all your procedures and function from the main_gui file
in several files in one directory then you should have no problems
to have them compiled in the right order.


In idl sav files will same handled as procedures. It's not necessary 
to restore them first - a call is enough.
The main_gui_info() is available after the routine in idl is once used.
I am not sure if I have explained this in this way.


Are you using system variables?

regards
Reimar





> 
> Reimar Bauer wrote:
> >
> > Dear Tom,
> >
> > I have written a compile routine for idl.
> >
> > And we have had no problems with this compiled code.
> >
> > You should try this routine.
> >
> > http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_html/dbase/download/compile.tar.gz
> >
> > idl > compile,'main_gui.pro'
> >
> > and additional a function inside is created
> >  main_gui_info
> >
> > print,main_gui_info()
> >
> > shows all compiled and embedded pro and sav files.
> > (last modification ,file /dir ...)
> >
> > RESTRICTIONS:
> > !PATH     is undefined during runtime
> > execute   won't work in runtime
> >
> > If my routine won't work I am interested to learn from you!
> >
> > regards
> > Reimar
> >
> > p.s. better you don't post HTML
> >
> > "Thomas S. Spisz" wrote:
> >
> > >
> > >
> > > I have a problem with IDL code that I "saved" (compiled) using the
> > > SAVE command -- it doesn't execute the same as the same code run
> > > directly from the IDL Development Environment.  (By the way, I do
> > > realize that you can't really compile IDL code.)  Let me explain the
> > > situation.  First of all, I'm on Windows NT machine, and IDL 5.4.
> > >
> > > I have a set of procedures with one procedure called 'main_gui.pro'
> > > that is the main procedure that calls other procedures.  I can enter
> > > IDL, compile 'main_gui.pro' and all it's necessary procedures.  Then
> > > type 'resolve_all', and run it -- it does beautifully.
> > >
> > > However, if I enter IDL, compile 'main_gui.pro' and all it's necessary
> > > procedures.  Then type 'resolve_all'.  Then type
> > > "save, filename='c:\main_gui.sav', /routines"  which saves everything
> > > into that single binary file.  When I double-click on 'main_gui.sav',
> > > it does execute but not correctly.  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.
> > >
> > > 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.
> > > Therefore, I don't see the output log and cannot use any of the debug
> > > capabilities in the IDL Development Environment.
> >
> > You can restore the file in the idl development and execute then
> > main_gui.
> > If you see that's something additional is compiled then this is the
> > reason
> > why it's not working
> >
> > >
> > > Any knowledge or help with this problem is greatly appreciated.
> > >
> > > Tom Spisz
> > > Johns Hopkins University Applied Physics Laboratory
> > > 11100 Johns Hopkins Road
> > > Laurel, MD  20723-6099
> > > 240-228-7260
> > > tom.spisz@jhuapl.edu
> > >
> > >
> > >
> > regards
> >
> > Reimar
> > --
> > Reimar Bauer
> >
> > Institut fuer Stratosphaerische Chemie (ICG-1)
> > Forschungszentrum Juelich
> > email: R.Bauer@fz-juelich.de
> > http://www.fz-juelich.de/icg/icg1/
> > ==================================================================
> > a IDL library at ForschungsZentrum Juelich
> > http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.html
> >
> > http://www.fz-juelich.de/zb/text/publikation/juel3786.html
> > ==================================================================
> >
> > read something about linux / windows
> > http://www.suse.de/de/news/hotnews/MS.html

-- 
Reimar Bauer 

Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
==================================================================
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.html

http://www.fz-juelich.de/zb/text/publikation/juel3786.html
==================================================================

read something about linux / windows
http://www.suse.de/de/news/hotnews/MS.html