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 #33002 is a reply to message #32999] Thu, 21 November 2002 12:52 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
The simpliest way is to pass a few parameters to SetParams that reside
in the Mainbase STATE structure. I personally, for simplicity sake, pass
the entire STATE structure (which gets passed by reference and is easy
to update in that case).
Of course, it is cleaner if you only pass fields of STATE (that are
pointers because otherwise you'd be passing state.fields by value but if
you alter *state.fields, these will get updated).
If you want to update, say, labels on Mainbase, you can simply call
WIDGET_CONTROL on the State.MainBaseID inside SetParams.
Or, if you want to really do something intricate with the results
returned by SetParams, you could do something like depicted on
http://www.ainaco.com/idl/idl_library/export_to_main.pro
which will interrupt the main event handler until dismissed.
Cheers,
Pavel

Gert wrote:
>
> Hi,
>
> 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?
> 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.
>
> thx for any help,
>
> Gert
[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: Sun Oct 12 04:43:11 PDT 2025

Total time taken to generate the page: 1.19915 seconds