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

Home » Public Forums » archive » Re: how to exchange variable between modal dialog and the main window?
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: how to exchange variable between modal dialog and the main window? [message #48064] Tue, 21 March 2006 06:40 Go to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
lindows wrote:
> I'm doing a project,about image processing.But I don't know how to how
> to exchange variable between modal dialog and the main window.I can't
> find more material about the message exchanging in IDL windows.Could
> someone can help me?
> Now I use the GUIBuilder,in main window,put a button and make a
> procedure like this:
>
> pro OnPress,event
> dlggui,group_leader=event.top
> end
>
> dlggui is another procedure,with
> files:dlggui.pro,dlggui_event.pro,dlg_gui.prc.
>
> I don't know how I can transfer a variable or point A from main window
> to dlggui,I want to change the value of dlggui,in main program.
>
> thanks.
>

Transferring the variable from the main window to the dialog is easy --
just pass it as a parameter or keyword. Returning it is more tricky:

If your dialog is modal, you probably want to return the variable to the
main window at the point when the modal dialog is closed. In this case,
write your modal dialog as function which returns the variable:

http://www.dfanning.com/widget_tips/popup.html

If your dialog is not modal, i.e. you want to exchange information while
it is running in parallel with the main window, you can either send
events (widget_control, id, send_event=...) or write the dialogs (at
least the recipient of the information) as an object and call an object
method. Ask back if you need more information.

Good luck,
Benjamin
[Message index]
 
Read Message
Read Message
Previous Topic: Re: How do I reduce active memory used by program?
Next Topic: Re: How to debug seg fault.

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

Current Time: Wed Oct 08 18:56:04 PDT 2025

Total time taken to generate the page: 0.00453 seconds