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

Home » Public Forums » archive » Re: Is that window open??
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Is that window open?? [message #8571 is a reply to message #8570] Wed, 02 April 1997 00:00 Go to previous messageGo to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Phil Williams wrote:
>
> How would I check to see if a window ID is still open in a widget
> program?
>
> Here's what I did
> oldwin = !d.window
> wset, info.wid
>
> ; some code here
>
> ;--- restore the oldwin
> wset, oldwin
>
> and it crashes with
> % WSET: Window is closed and unavailable.

I think the most straightforward thing to do would be:

oldwin = !d.window
device, window_state=windows
case ( windows(info.wid) ) of
0: <window is closed...recreate or whatever>
1: wset, info.wid
endcase

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2200
La Jolla, CA 92037
[ UCSD Mail Code 0949 ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: file paths
Next Topic: Re: ANY LINUX IDL USERS?

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

Current Time: Sun Oct 12 19:43:59 PDT 2025

Total time taken to generate the page: 0.01319 seconds