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

Home » Public Forums » archive » Re: Using Comm... err, alternative?
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: Using Comm... err, alternative? [message #21192 is a reply to message #21182] Thu, 17 August 2000 00:00 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Pavel Romashkin wrote:
>
> David Fanning wrote:
>>
>> The more relevant question, it seems to me, is why
>> in the world would you care? Multiple windows on the
>> display are going to be mixed up by the user anyway.
>> Why try to go to any effort to order them?
>
> My idea was, if a user creates several plot windows during an ad-hoc
> session, then he can overplot from command line to any one of them by
> just bringing it to the foreground. I am beginning to think that a
> common block is appropriate here, because I see no other way to link an
> existing widget with command-line executed code.

Maybe there's another way. The following is from the IDL 5.3 online help
for XREGISTERED:

"The XREGISTERED function returns True if the widget named as its
argument is currently registered with the XMANAGER as an exclusive
widget. Otherwise the routine returns false. If the named widget is
registered, XREGISTERED returns the number of instances of that name in
the list maintained by XMANAGER. The registered widget is brought to the
front of the desktop unless the NOSHOW keyword is set."
[stuff deleted]
"Note - XREGISTERED checks for Name in a COMMON block created by
XMANAGER. The stored name is case-sensitive."

The common block in question is named 'MANAGED' (not such a good name,
but whatever):

COMMON managed, ids, $ ; IDs of widgets being managed
names, $ ; Names of widgets being managed
modalList ; List of active modal widgets

If your application is named 'XPLOT' (i.e. the name that was passed to
XMANAGER), then if N instances of the widget exist, there should be N
entries in NAMES with the value 'XPLOT', and N corresponding entries in
IDS. Thus you could get to the identifiers of active widgets without
having to create your own common block. Of course, this relies on the
internals of XMANAGER: it would be better if XREGISTERED returned an
array of identifiers for the requested widget names.

If you choose to go ahead and create your own COMMON block or
user-defined system variable, then at least you have things under your
control, and you are not depending on the XMANAGER implementation.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: VIRUS ALERT (was: Ghost object)
Next Topic: Re: get values from WIDGET_TABLES

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

Current Time: Tue Dec 02 11:11:34 PST 2025

Total time taken to generate the page: 0.71593 seconds