Re: valid vs managed widget [message #40135] |
Tue, 20 July 2004 09:12 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> I will keep using XMANAGER and VALID_ID (especially since MANAGED is not in the
> IDL online docs for WIDGET_BASE, I just can't go there).
Oh, right! Well, if anyone is cramming for the IEPA exam
the end of August, here is one you might remember. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: valid vs managed widget [message #40136 is a reply to message #40135] |
Tue, 20 July 2004 09:05  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
David Fanning wrote:
>
>
> I'd have to do some experimenting to know for sure, but
> I doubt whether a "managed" widget is even meaningful in
> this day and age when you don't even really need an XMANAGER
> call to run a widget program. Non-blocking widget programs
> run without it, although you do have to set the MANAGED
> keyword on the TLB, so maybe it does still make some sense,
> although presumably only for the widget that has the MANAGED
> keyword set for it.
>
> http://www.dfanning.com/widget_tips/xmgrneed.html
>
> If VALID_ID is working for you, I think I'd stick with it. :-)
>
OK! Thanks.
The question came up because I was testing some code - in which there was a bug
in the GUI method - so the GUI appeared but was not 'managed'.
I will keep using XMANAGER and VALID_ID (especially since MANAGED is not in the
IDL online docs for WIDGET_BASE, I just can't go there).
Ben
|
|
|
Re: valid vs managed widget [message #40137 is a reply to message #40136] |
Tue, 20 July 2004 08:07  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ben Tupper writes:
> When I want to have a particular GUI realized only once (say for a GUI based
> object property editor) I have always used ...
>
> If WIDGET_INFO(myWidgetID, /VALID_ID) EQ 1 BEGIN
> WIDGET_CONTROL, myWidgetID, /SHOW
> RETURN
> END
>
>
> But this morning the heavy fog out on the bay has crept into my mind and filled
> it with a nagging doubt; should I be testing if IDL is already managing the
> widget ID instead? Some combination? And just what is the difference between a
> VALID ID and a MANAGED ID?
>
> Here's the online description of each keyword to WIDGET_INFO.
>
> VALID_ID
> Set this keyword to return 1 if Widget_ID represents a currently-valid widget.
> Otherwise, 0 is returned.
>
>
> MANAGED
> Set this keyword to return 1 if the specified widget is managed, or 0 otherwise.
I'd have to do some experimenting to know for sure, but
I doubt whether a "managed" widget is even meaningful in
this day and age when you don't even really need an XMANAGER
call to run a widget program. Non-blocking widget programs
run without it, although you do have to set the MANAGED
keyword on the TLB, so maybe it does still make some sense,
although presumably only for the widget that has the MANAGED
keyword set for it.
http://www.dfanning.com/widget_tips/xmgrneed.html
If VALID_ID is working for you, I think I'd stick with it. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|