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

Home » Public Forums » archive » Re: cannot run .sav file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: cannot run .sav file [message #17498] Wed, 20 October 1999 00:00
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
lsyrkin@yahoo.com writes:
>
> Hi,
>
> I need to save a widget program as .sav file to make it run on the same UNIX
> machine from cmdtool and on another one under run-time IDL licence. This
> program works fine if I start it from IDLDE. To save the program I do the
> next:
>
> 1. Open IDLDE.
> 2. Open a program XeIm.pro that is used by main widget program DisplXe.pro.
> 3. Open DisplXe.pro.
> 4. Compile All.
> 5. Save, /Routines, Filename='Xe.sav'
> 6. Close IDLDE.
> 7. Change mode for Xe.sav for execute.
> 8. Start Xe.sav from UNIX prompt.
>
> It does not start and gives the next lines: $ ./Xe.sav ./Xe.sav: SR^D: not
> found ./Xe.sav: ^DH^XTue: not found ./Xe.sav:
> ^E^Esparc^Esunos^C5.2^L^_^H^GDISPLXE^M4!^B^R!: not found ./Xe.sav:
> IMCOLORSID!^K^FSAVEID^F^L^FOPENID^D^M^FQUITID^^^N^FVIEWID^U^ O^KVIEW_COPYID^[^
> ... garbage excised

I think you are trying to run the IDL SAVE files like an executable
program. It is not executable! The garbage you are seeing is the
Unix shell trying to interpret the binary data as shell commands. I
think you will still have to make a small script which loads the SAVE
file and runs the right start-up function. You could do something
like this:

--------
#!/bin/sh
idl << EOF
path = '/home/leonid/'
restore, path+'Xe.sav'
leonid_main
exit
EOF
--------

You will have to make this executable, be sure the path is correct,
and define leonid_main to start whatever programs you want to start.

The comments by R. Bauer about resolving all of the routines are
probably appropriate too.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: cannot run .sav file [message #17500 is a reply to message #17498] Wed, 20 October 1999 00:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
lsyrkin@yahoo.com wrote:

> Hi,
>
> I need to save a widget program as .sav file to make it run on the same UNIX
> machine from cmdtool and on another one under run-time IDL licence. This
> program works fine if I start it from IDLDE. To save the program I do the
> next:
>
> 1. Open IDLDE.
> 2. Open a program XeIm.pro that is used by main widget program DisplXe.pro.
> 3. Open DisplXe.pro.
> 4. Compile All.
> 5. Save, /Routines, Filename='Xe.sav'
> 6. Close IDLDE.
> 7. Change mode for Xe.sav for execute.
> 8. Start Xe.sav from UNIX prompt.

You missed resolve_all.

Note RESOLVE_ALL does not resolve procedures or functions that are called via
CALL_PROCEDURE, CALL_FUNCTION, or EXECUTE. Class methods are not resolved either.

Similarly, RESOLVE_ALL does not resolve widget event handler procedures based on
a call to the widget routine that uses the event handler. In general, it is best
to include the event handling routine in the same program file as the widget
creation routine�building widget programs in this way ensures that RESOLVE_ALL
will "catch" the event handler for a widget application.

You should run once the widget and normally you should have defined all your
event_handlers in the routine where you defined your widget.

R.Bauer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SAVE/RESTORE question
Next Topic: callable IDL error handling

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

Current Time: Sun Oct 12 06:30:53 PDT 2025

Total time taken to generate the page: 1.20192 seconds