Re: WSet to negative value [message #74416 is a reply to message #74415] |
Mon, 17 January 2011 15:42   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 1/17/11 4:26 PM, David Fanning wrote:
> Folks,
>
> I was just fooling around with a program and realized I can
> do a WSet, -1 in this version of IDL (Windows 7.1.2). I am convinced
> this was not always possible, since I have written a lot of
> code in my day like this:
>
> IF currentWindow GE 0 THEN WSet, currentWindow
>
> I wonder if this is a Windows thing, or an IDL version thing.
> If anyone running an older version of IDL could try to set
> their graphics window to -1, I would love to hear what version
> of IDL you are running and what the results are:
>
> WSet, -1
>
> Thanks,
>
> Cheers,
>
> David
>
> P.S. I am just putting the final touches on a completely
> revamped FSC_Window program. It is working great. You can
> have multiple resizeable graphics windows, add and delete
> commands to/from the windows, replace commands, display multiple
> commands in the window, list the commands in the window,
> choose which of several windows you want to work with,
> send the commands to a PostScript file, make raster image
> files out of the window using ImageMagick or not, etc.
> I quite honestly have never seen anything like it in IDL. :-)
>
It's not a Windows thing:
IDL> wset, -1
IDL> wset, -2
% WSET: Window is closed and unavailable.
% Error occurred at: $MAIN$
% Execution halted at: $MAIN$
From the docs for WSET:
"If you set Window_Index equal to -1, IDL will try to locate an existing
window to make current, ignoring any managed draw widgets that may
exist. If there is no window to make current, WSET changes the value of
the WINDOW field of the !D system variable to -1, indicating that there
are no current windows."
I'm running 8.0.1 on Mac OS X:
IDL> print, !version
{ x86_64 darwin unix Mac OS X 8.0.1 Oct 5 2010 64 64}
Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
|
|
|