----- Original Message -----
From: "Fabio D'Alfonso" <[email protected]>
To: <[email protected]>
Sent: Tuesday, January 17, 2012 2:22 AM
Subject: Re: [Perldl] Close Dialog On /GW Device PGPLOT
Hi,
using the pgbegin and the PGPLOT module, the pop up does not show.
So is the code using the grwnd in the similar PDL module to trig that?
The popup will show in a PGPLOT script whenever pgend is called - eg:
use PGPLOT;
$dev = '/GW';
pgbegin(0,$dev,0,0);
sleep(2);
pgend;
First, in the console, I'll get:
Type <RETURN> for next page:
Then, when I hit "Enter", the popup appears.
I think there might be some other way of making the popup appear - one that
doesn't first put "Type <RETURN> for next page:" in the console, but I don't
know what that "other way" is.
Also, I couldn't actually find any pgend calls in the PDL::Graphics::PGPLOT
modules.
Basically, I'm out of ideas (for the moment at least), but I'll take another
look tomorrow and see if I can find something.
I had hoped that commenting out the END{} block in PDL/Graphics/PGPLOT.pm
would take care of it, but it doesn't - there's still something in the
cleanup (that occurs after the script has exited) that wants to throw up the
popup, so we need to work out how that comes about and how it might be
avoided.
How about :
##################
use warnings;
use PDL;
use PDL::Graphics::PGPLOT;
$a = rfits("m51_raw.fits");
dev($^O =~ /MSWin32/ ? '/GW' : '/XSERVE');
imag $a;
print "Hit \"Enter\" to exit\n";
<STDIN>;
##################
Just put '<STDIN>;' at the end of all your scripts !!
That will at least suppress the popup until you hit "Enter". (Not very good
.... I know :-)
Cheers,
Rob
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl