Re: Is a Widget realized? [message #4144] |
Fri, 28 April 1995 00:00 |
Jackel
Messages: 30 Registered: April 1993
|
Member |
|
|
In article <3nphat$f79@mirv.unsw.edu.au> feigin@saturn.gas.unsw.EDU.AU (Michael Feigin,ARC Research Fellow,AS,951231) writes:
> From: feigin@saturn.gas.unsw.EDU.AU (Michael Feigin,ARC Research Fellow,AS,951231)
> Subject: Is a Widget realized?
> Date: 28 Apr 1995 01:45:01 GMT
> 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!
[example deleted]
> Does anyone know how to get the information "Is a Widget REALLY realized?",
> ie how do I overcome the above problem?
Have you tried the /VALID_ID keyword for WIDGET_INFO? ie.
IF ( WIDGET_INFO( testID, /VALID_ID ) EQ 1 ) THEN $
realized=WIDGET_INFO( testID, /REALIZED ) ELSE realized=0
It would be nice if WIDGET_INFO had the /BAD_ID keyword that
WIDGET_CONTROL has. Maybe next release :)
Brian
|
|
|
Re: Is a Widget realized? [message #4146 is a reply to message #4144] |
Fri, 28 April 1995 00:00  |
Fergus Gallagher
Messages: 41 Registered: January 1995
|
Member |
|
|
feigin@saturn.gas.unsw.EDU.AU (Michael Feigin,ARC Research Fellow,AS,951231) wrote:
>
> 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!
>
> Does anyone know how to get the information "Is a Widget REALLY realized?",
> ie how do I overcome the above problem?
>
> Thanks.
>
> Sincerely,
> Michael.
>
If a widget is destroyed, it's identifier becomes invalid (as if it never existed) -
you need to check that it is a valid id first
valid = widget_info(base,/valid_id)
if valid then realized=widget_info(base,/realiszed)
Fergus
=================================================
| Fergus Gallagher |
| Remote Sensing Applications Development Unit |
| British National Space Centre |
| Monks Wood |
| Huntingdon PE17 2LS / UK |
| |
| F.Gallagher@nerc.ac.uk |
| http://uh.nmt.ac.uk/bnsc/fgg.html |
=================================================
|
|
|