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

Home » Public Forums » archive » Re: global variables in IDL
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: global variables in IDL [message #28648 is a reply to message #28647] Wed, 26 December 2001 17:39 Go to previous messageGo to previous message
Kristine Hensel is currently offline  Kristine Hensel
Messages: 26
Registered: June 1999
Junior Member
Gert wrote:
>
> David,
>
> thanks for the tip - I could off course do it this way, but then i need to
> pass the pointer around to anyone who might need it. What i wanted to is
>
> pro Widgetpro,
>
> widgetID = getIDofGlobalswidget
> WIDGET_CONTROL, widgetID , GET_UVALUE=sGlobals, /NO_COPY
>
> print, sGlobal.threshold
>
> ...
> end
>
> is this possible? How can I do the 'getIDofGlobalswidget'?

If your global widget is registered using XMANAGER, i.e.
xmanager, 'global widget', base_id_of_global_widget
then the name and ID are stored in the MANAGED common block, which is
used by XREGISTERED.

To get the ID of the global widget, a calling procedure needs to use
this common block:
COMMON MANAGED, ids, names, outermodal

You can then look through the list of registered names to find the
widget(s) that you want:
validids = WHERE(ids ne 0, answer)
if (answer ne 0) then begin
registered = WHERE(names(validids) EQ 'global widget', answer)
if (answer ne 0) then begin
registered = validids(registered)
; get the IDs registered under this
; name:
global_ids = ids[registered]
endif ; name is registered?
endif ; some valid IDs?

I use something like this for an error message widget. All (ahem) the
error messages get stuck in the same widget, rather than popping up
individual messages, and I use this code to figure out whether an error
message widget has already been opened or whether a new one should be
created.

Kristine

--
Kristine Hensel e-mail: kristine@esands.com
Environmental Systems & Services phone: +61-(0)3-9835-7901
20 Council St., Level 3 fax: +61-(0)3-9835-7900
Hawthorn East, VIC, Australia 3124
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Gridding Gui
Next Topic: Inverting the image

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

Current Time: Thu Oct 09 02:46:51 PDT 2025

Total time taken to generate the page: 0.64584 seconds