Is a Widget realized? [message #4147] |
Fri, 28 April 1995 00:00 |
feigin
Messages: 3 Registered: April 1995
|
Junior Member |
|
|
Dear colleagues,
As far as I understand, keyword REALIZED to Widget_Info function is used
to check, if Widget_ID is realized. But this function interrupts, if Widget_ID
was realized but has been destroyed later!
For example, the following simple commands in IDL work correct
(my comments to the right are in this text editor only):
IDL> base = Widget_Base() ;create Widget
IDL> print, 'base=', base ;check ID
base= 1
IDL> is_realized = Widget_Info(base, /REALIZED) ;check, if REALIZED
IDL> print, 'is_realized=', is_realized ;result of the checking
is_realized= 0
OK, but the same after realizing and destroying:
IDL> base = Widget_Base() ;create Widget
IDL> print, 'base=', basee ;check ID
base= 1
IDL> Widget_Control, base, /REALIZE ;realize the Widget
IDL> is_realized = Widget_Info(base, /REALIZED) ;check, if REALIZED
IDL> print, 'is_realized=', is_realized ;result of the checking
is_realized= 1
IDL> Widget_Control, base, /DESTROY ;destroy the Widget
IDL> print, 'base=', base ;check that the ID is still alive
base= 1
IDL> is_realized = Widget_Info(base, /REALIZED) ;check, if REALIZED, I'm expecting is_realized=0!!
% WIDGET_INFO: Invalid widget identifier: 1.
% Execution halted at $MAIN$ (WIDGET_INFO).
Does anyone know how to get the information "Is a Widget REALLY realized?",
ie how do I overcome the above problem?
Thanks.
Sincerely,
Michael.
|
|
|