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

Home » Public Forums » archive » Re: X11 macOSX woes
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: X11 macOSX woes [message #39583 is a reply to message #39582] Thu, 27 May 2004 11:59 Go to previous messageGo to previous message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
Might you be trying to plot or draw into this window after it has been
closed? You didn't say what kind of an X11 window it is. I imagine
with window with your IDL session is open, or else how could you read
the error message?

It's a pain, but you could put an explicit line in the code to check
if the window is valid before drawing to it. For direct-graphics
windows, I made the function below, window_valid(). For object
graphics, you could test the IDLgrWindow object. For widget programs,
there are two things you can do. First, test if the widget ID is still
valid with widget_info(ID, /VALID_ID); also add a cleanup routine so
that if a widget is closed, it knows to clear the event queue, free
pointers, and destroy objects properly. If you throw these tricks in,
at least you can help identify the problem by telling the program to
alert you when one of the tests fails.

M. Katz

; IDL function: window_valid.pro
;
; This function checks to make sure the given window number is valid,
; and returns 1=valid or 0=not valid.
;
function window_valid, num, window_state=window_state
device, window_state=window_state
n = n_elements(window_state)
return, (num GE 0) and (num LT n) and window_state(0 > num < (n-1))
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: XYOUTS and Postscript
Next Topic: Re: Uncaught PARTICLE_TRACE exception

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

Current Time: Sat Oct 11 06:08:18 PDT 2025

Total time taken to generate the page: 1.75911 seconds