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 #28637] Fri, 28 December 2001 08:39 Go to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
JD Smith wrote:

> This objection, though oft-repeated, is somewhat unfounded, I think.
> The chief problem with common blocks for global state data is that only
> a single such block exists. For example, if you store the widget id of
> a button in:
>
> common mywidget, mybutton
> mybutton=widget_button(base,value='Foo')
>
> Then `mybutton' will be the *only* button that can exist for your
> program in a single IDL session.

Oh geez. Did I ever advocate a primitive way of using Common blocks? All
I was saying is, if you want to not have *any* common blocks, then you
will have them if you use Xmanager.

> XManager does use common blocks, but, by design, it uses them
> intelligently. Instead of overwriting common block variables, it
> maintains global lists of all the widgets it needs to manage

Absolutely. This is why I am saying that if one needs any sort of global
access in IDL, Common blocks are the way to go. I myself chose this way
when I needed random global access
(http://spot.colorado.edu/~romashki/idl/display.pro). But if you
absolutely hate them, there are other ways.

As a matter of fact, I now think I found a way to achieve all the
intelligencee of Xmanager style of Common usage but having nothing more
than a Long integer in one Common variable. I will post the code when it
is past the idea stage just to get input from the NG.

Cheers,
Pavel
[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: Wed Oct 08 18:11:38 PDT 2025

Total time taken to generate the page: 0.00484 seconds