John Labenski <[EMAIL PROTECTED]> writes: > > On Feb 1, 2008 12:05 AM, A. Klingenstein <[EMAIL PROTECTED]> wrote: > > I have a Windows app in C which can and mainly does load plugins to "do > > the actual work". > > > > One of those plugins is a Lua interpreter allowing users to write their > > scripts. I want to make Lua scripts which can do GUI stuff and not only > > "backend", non-visual things. I wanted to use wxLua for that, but the > > main application already has its own normal Windows event message pump. > > How can I add one or possibly several (from several different Lua GUI > > scripts) mainloops? > > > > Are threads my only solution for this problem or are there alternatives > > I haven't seen yet? > > I am not familiar with how to replace the wxWidgets event loop, but > from the messages I've seen on the wx-users mailing list I think > people have been told to use the wxWidgets message loop. However, I > think it would be best to search their mailing list to be sure. If you > can find a way that will work it would be possible to change the wxLua > module to behave differently depending on the value of some unique Lua > global variable. > > Regards, > John > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >
i would recommend either using threads (not so compatible) or a coroutine dispatcher and then hook/insert plugin loops/functions to that.( examples in the lua manual). a partial event updating trick (no coroutines or threads) can be seen in luacalc (sourceforge), a resize(sizer) event updates (triggers) a Scalable paint window. (*this resize could be replaced by network events or gui button presses etc) I hope this information is helpful. Kai. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users