Re: WShow Prayers Answered! [message #72837] |
Sun, 10 October 2010 16:41  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> If I open a graphics window with the Window command, that
> window will never come to the foreground with the WSHOW
> command.
>
> UNLESS, I then open a widget window. Here is the code
> I use to open a widget window (I can use any widget
> program I have hanging around, but I wanted to reduce
> the problem to its essentials.)
Alas, this "solution" appears to only work on my
Windows machine. WSHOW is completely ignored on my
LINUX machine, where I have been completely unsuccessful
in getting an IDL direct graphics window to pop forward
on the display.
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: WShow Prayers Answered! [message #72838 is a reply to message #72837] |
Sun, 10 October 2010 16:16   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
>> I've been praying for a LONG time. This is the first
>> time I can remember my prayers being answered!
>>
>> This morning, like every morning, I typed "wshow"
>> to bring my IDL graphics window to the foreground,
>> and today it worked!!!
>>
>> My goodness gracious! I have NO idea what changed.
>> I just know I am NEVER getting out of this IDL session!
>
> Well, I'm still in this session. I'm just working the
> way I normally do. Now WShow works sporadically. I have
> not been able to discover what conditions, if any,
> cause it to work, and which don't. It's about as
> reliable as the dog.
>
> I feel my faith ebbing and flowing. Do you
> suppose I'm not praying hard enough? Back to
> the rosary, I guess. :-(
Alright. Are you ready for this? Please sit down.
It turns out this probably has nothing to do with
prayer. (I know, I'm disappointed, too.)
Here are the details. Windows 7 64-bit OS, with this
IDL version:
{ x86_64 Win32 Windows Microsoft Windows 8.0 Jun 17 2010 64 64}
If I open a graphics window with the Window command, that
window will never come to the foreground with the WSHOW
command.
UNLESS, I then open a widget window. Here is the code
I use to open a widget window (I can use any widget
program I have hanging around, but I wanted to reduce
the problem to its essentials.)
;*******************************************************
PRO junk
tlb = Widget_base()
draw = Widget_Draw(tlb, xsize=200, ysize=200)
widget_control, tlb, /realize
xmanager, 'tlb', tlb, /No_block
END
;*******************************************************
Now the first IDL graphics window will come forward
on the display with WSHOW. I can kill the widget window
and the graphics window will *still* come forward. If
I kill the display window and open another one, I have
the same problem: WSHOW doesn't work again. Opening a
widget window mysterious wakes it up!
If I have multiple IDL graphics windows on the display,
they ALL ignore the WSHOW command. Until I run "junk".
Then they all respond normally to WSHOW.
If I run this sequence:
IDL> window, 0
IDL> junk
IDL> window, 1
Then neither window 0 or window 1 will respond to the
WSHOW command!!
Extremely weird. Now I'm worried about demons... :-(
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: WShow Prayers Answered! [message #72839 is a reply to message #72838] |
Sun, 10 October 2010 14:28   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I've been praying for a LONG time. This is the first
> time I can remember my prayers being answered!
>
> This morning, like every morning, I typed "wshow"
> to bring my IDL graphics window to the foreground,
> and today it worked!!!
>
> My goodness gracious! I have NO idea what changed.
> I just know I am NEVER getting out of this IDL session!
Well, I'm still in this session. I'm just working the
way I normally do. Now WShow works sporadically. I have
not been able to discover what conditions, if any,
cause it to work, and which don't. It's about as
reliable as the dog.
I feel my faith ebbing and flowing. Do you
suppose I'm not praying hard enough? Back to
the rosary, I guess. :-(
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: WShow Prayers Answered! [message #74915 is a reply to message #72838] |
Wed, 09 February 2011 03:18  |
Fabzou
Messages: 76 Registered: November 2010
|
Member |
|
|
Hi,
On 10/11/2010 01:16 AM, David Fanning wrote:
> If I open a graphics window with the Window command, that
> window will never come to the foreground with the WSHOW
> command.
I have this problem too.
The following code would not produce anything on my screen neither:
IDL> print, !VERSION
{ x86_64 linux unix linux 7.1.1 Aug 21 2009 64 64}
IDL> cgDisplay, /FREE, XSIZE=500, YSIZE=500, /PIXMAP
IDL> cgplot, LOADDATA(17)
IDL> xwin = !D.WINDOW
IDL> help, xwin
XWIN LONG = 44
IDL> wshow, xwin
So what are the alternatives? Currently I am doing this:
IDL> img = Transpose(tvrd(/TRUE), [1,2,0])
IDL> WDELETE, xwin
IDL> cgDisplay, /FREE, XSIZE=500, YSIZE=500
IDL> cgImage, img
But is there a better solution ?
Thanks a lot!
Fab
|
|
|