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

Home » Public Forums » archive » Re: Sharing program
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: Sharing program [message #56244] Tue, 09 October 2007 13:14
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rpertaub@gmail.com writes:

> I have a different problem now, the program works on Virtual Machine,
> I tested it on someone else's computer that does not have IDL.
> However, the end result of my program is a window which shows my end
> image (after n analysis and processing). However, the image appears
> for a split second and then closes. How do I keep it open? It seems it
> is ending the program, I am not sure how to make it not do that...

Don't exit your program, simply. :-)

Perhaps a GUI with a QUIT button is all you need.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Sharing program [message #56245 is a reply to message #56244] Tue, 09 October 2007 13:13 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
rpertaub wrote:
> On Oct 9, 2:18 pm, Rick Towler <rick.tow...@nomail.noaa.gov> wrote:
>> rpertaub wrote:

> I have a different problem now, the program works on Virtual Machine,
> I tested it on someone else's computer that does not have IDL.
> However, the end result of my program is a window which shows my end
> image (after n analysis and processing). However, the image appears
> for a split second and then closes. How do I keep it open? It seems it
> is ending the program, I am not sure how to make it not do that...

Yes, the VM is exiting. At the very least you'll need to throw up a
dialog with DIALOG_MESSAGE() that will block until the user clicks o.k.
at which point your application will finish and the VM will exit.

You may want to take a look at my RHTvmConsole object that can act as a
simple replacement for console based applications in the VM that use
print and read. I've converted a few large programs over just using
search and replace. Using this, you could print out information
regarding the status of the processing, display the image, then wait for
the user to hit return to continue (or exit).

www.acoustics.washington.edu/~towler/programs/RHTvmConsole.z ip

-Rick


(Dick, I do have your improved version (thank you!) that I will upload)
Re: Sharing program [message #56246 is a reply to message #56245] Tue, 09 October 2007 12:47 Go to previous message
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
On Oct 9, 2:18 pm, Rick Towler <rick.tow...@nomail.noaa.gov> wrote:
> rpertaub wrote:
>> Where are you supposed to save the images and read them from so that
>> there is no hic in VM? Is there a special filepath?
>
> Yes, one that isn't hard coded :)
>
> The best approach would be to make the user responsible. Throw up a
> dialog or two to select a data/temp/whatever directory
> (dialog_pickfile). Otherwise you're asking for it. If you really want
> the frustration, download Jim Pendleton's sourcepath.pro from the ITTVIS
> code contrib site:
>
> http://www.ittvis.com/codebank/search.asp?FID=347
>
> You can distribute your application (.sav) with a set of directories
> where it looks for and writes data. sourcepath will allow you to get
> the file path to those directories no matter where your application
> directory exists.
>
> -Rick

Thanks all for your help!
I actually moved all my data to one folder just in the c: drive, and
voila!

I have a different problem now, the program works on Virtual Machine,
I tested it on someone else's computer that does not have IDL.
However, the end result of my program is a window which shows my end
image (after n analysis and processing). However, the image appears
for a split second and then closes. How do I keep it open? It seems it
is ending the program, I am not sure how to make it not do that...

thanks,
rp
Re: Sharing program [message #56247 is a reply to message #56246] Tue, 09 October 2007 11:18 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
rpertaub wrote:

> Where are you supposed to save the images and read them from so that
> there is no hic in VM? Is there a special filepath?

Yes, one that isn't hard coded :)

The best approach would be to make the user responsible. Throw up a
dialog or two to select a data/temp/whatever directory
(dialog_pickfile). Otherwise you're asking for it. If you really want
the frustration, download Jim Pendleton's sourcepath.pro from the ITTVIS
code contrib site:

http://www.ittvis.com/codebank/search.asp?FID=347

You can distribute your application (.sav) with a set of directories
where it looks for and writes data. sourcepath will allow you to get
the file path to those directories no matter where your application
directory exists.


-Rick
Re: Sharing program [message #56249 is a reply to message #56247] Tue, 09 October 2007 10:29 Go to previous message
rpertaub@gmail.com is currently offline  rpertaub@gmail.com
Messages: 43
Registered: January 2007
Member
On Oct 8, 1:28 pm, David Fanning <da...@dfanning.com> wrote:
> rpert...@gmail.com writes:
>> Now I am not sure how to export it so
>> that I can run on VM? I tried saving the project as a .sav but that
>> did not work (when I used to small icons on the project bar) but did
>> when I tried a save as from the File menu.
>
> Say what!? As far as I know, it is impossible
> to create a save file from the File menu.
>
>> However that .sav program
>> does not work in VM. It gives me an error about using restore.
>
>> Is restore not a command that is able to be shared?
>
> RESTORE is certainly a command that can be used. Probably
> your program is not finding the file where it expects to find
> it (that is, in the same directory that the SAVE file is
> located). Remember that your start up file, etc. do NOT
> get run on the VM, so everything has to be located in the
> same place if you expect to find it. Of course, your program
> has to be written to look in that place, too. :-)
>
> Cheers,
>
> David
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/

Right!

Playing around more, I was able to export and have the .sav file.
However, as you say, my problem is finding my files. I have a series
of procedures one after another, which look for images, process and
save them on the hard disk, and then restore in next procedure to do
some other analysis, and so on. Hence, lots of saving to E drive, and
restoring. I understand this will be a problem in VM, however, I saved
all the images I needed into the project and still it spits out an
error of not being able to find folder at cd.

Where are you supposed to save the images and read them from so that
there is no hic in VM? Is there a special filepath?

Thanks!
RP
Re: Sharing program [message #56276 is a reply to message #56249] Mon, 08 October 2007 10:28 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
rpertaub@gmail.com writes:

> Now I am not sure how to export it so
> that I can run on VM? I tried saving the project as a .sav but that
> did not work (when I used to small icons on the project bar) but did
> when I tried a save as from the File menu.

Say what!? As far as I know, it is impossible
to create a save file from the File menu.

> However that .sav program
> does not work in VM. It gives me an error about using restore.
>
> Is restore not a command that is able to be shared?

RESTORE is certainly a command that can be used. Probably
your program is not finding the file where it expects to find
it (that is, in the same directory that the SAVE file is
located). Remember that your start up file, etc. do NOT
get run on the VM, so everything has to be located in the
same place if you expect to find it. Of course, your program
has to be written to look in that place, too. :-)

Cheers,

David

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: y axis tickmarks and box_plot
Next Topic: clustering- yet again

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

Current Time: Wed Oct 08 15:16:05 PDT 2025

Total time taken to generate the page: 0.00663 seconds