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

Home » Public Forums » archive » Re: Communication between top-level bases.
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: Communication between top-level bases. [message #11838] Fri, 29 May 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Imanol Echave (ccaeccai@sc.ehu.es) writes:

> I have a widget program with a top-level base which is the group leader of some
> other top-level bases. The events produced in the "child" top-level bases must
> be communicated to the "parent" top-level base. Do you know an "elegant" way to
> do this?

I like to define all "spawned" top-level base programs with
a NOTIFY_ID keyword. This keyword accepts a vector of widgets
that should be "notified" when something of importance happens.
When the thing I'm looking for occurs, I use WIDGET_CONTROL
to SEND_EVENT to the widget that needs to be notified. Sometimes
I make this event structure up to suit myself, or sometimes
it is just a normal event structure that I pass along to
another event handler.

You can see an example of how this works in my XCOLORS
program, a program that can "notify" a widget program
that the colors in the color table have changed. That
program can then, for example, redisplay an image that
is required. PROCESS is a program that gets notified by
XCOLORS when the color table is changed.

This is also explained more fully in the last two
chapters of my book. I use the technique there to
write non-modal widget dialogs without using common
blocks.

Cheers,

David

-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Previous Topic: Re: IDL & SNAKES!
Next Topic: Plotting data over geometric object

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

Current Time: Fri Oct 10 14:09:15 PDT 2025

Total time taken to generate the page: 0.68043 seconds