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

Home » Public Forums » archive » Re: launching many widgets at the same time
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: launching many widgets at the same time [message #44484] Wed, 15 June 2005 04:37
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
KK T wrote:

> I am new to IDL programming. The following is what I had been trying
> without any books on hand.
>
> I had created 3 .pro files of simple widget UI
> called: widgetA.pro, widgetB.pro and widgetC.pro.
>
> I had created another .pro files which made a call to all of them as
> such
>
> pro main
> widgetA
> widgetB
> widgetC
> end
>
> I run the main under IDL IDE and all widgets displayed on the screen.
> However, when I build and export as a runtime executeable, only widgetA
> appears on the screen. When I close this widget, widgetB appears and so
> on.
>
> Do I have to use threads in the main such that all widgets will get to
> appear at the same time on the screen?

Here is an article, written some time ago, but still probably relevant:

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

Basically, because the widget event loop will block in a run-time
environment, you want to run your programs with the JUST_REG keyword
set on the XMANAGER call for your widget programs. Then, when all the
programs are on the display, a single XMANAGER call will start the
event loop for all three at once. It will look *something* like this:

pro main
widgetA, /Just_Reg
widgetB, /Just_Reg
widgetC, /Just_Reg
XManager
end

Where, say, widgetA (as well as the others) is defined like this:

pro widgeta, JUST_REG=just_reg
...
xmanager, ..., JUST_REG=Keyword_Set(just_reg)
end

Cheers,

David
[Message index]
 
Read Message
Previous Topic: Locating IDL source code file
Next Topic: Re: IDL source editor alternatives?

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

Current Time: Wed Oct 08 17:40:03 PDT 2025

Total time taken to generate the page: 0.00459 seconds