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

Home » Public Forums » archive » Re: passing parameters from base to base
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: passing parameters from base to base [message #32999 is a reply to message #32991] Thu, 21 November 2002 15:46 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gert (Gert.Van.de.Wouwer@NOS_PAMpandora.be) writes:

> I've been trying to figure this one out for a while. I have 2 bases. If in
> Mainbase the button Set is pushed, a second base SetParams is called. Stuff
> happens there and the idea is that if SetParams is killed, a series of
> numbers go back to Mainbase. Now how can you write this neatly, so that the
> code for the SetParams can easily be used in other progs?
> These are my thoughts:
> I could pass a pointer to SetParams that keeps the desired data, but how
> does Mainbase knows that
> SetParams is killed and that it needs to update its fields?

If these are widget programs we are talking about, the simplest
way of communicating between them is to send events back and forth.
Typically, when program 1 calls program 2 it "registers" that it would
like to receive updates if "something important" goes on. In my XColors
program, for example, any program that wants to know about XColors
loading a color table will register with either NOTIFYPRO, NOTIFYOBJ,
or NOTIFYID keywords. Then, depending upon whether it is a procedure,
object, or widget that you want to receive the notification, XCOLORS
will use Call_Procedure, Call_Method, or SEND_EVENT (via Widget_Control)
to notify program 1.

http://www.dfanning.com/programs/xcolors.pro

If you want to know if program 2 is killed, you can do the notification
in its CLEANUP routine.

> I looked at the examples for compound widgets (e.g. cw_defroi) and these do
> the trick but they do not use xmanager. Is this the only way.

Oh, goodness me. Don't be learning your widget programming from
examples that come with IDL! Life is complicated enough already.
Get a good book instead. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL/MSWin pixmap limitations, Part 2
Next Topic: Re: Structure Pass By Reference?

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

Current Time: Mon Oct 13 00:45:02 PDT 2025

Total time taken to generate the page: 2.08094 seconds