From: John L. <jla...@gm...> - 2013-04-10 03:28:29
|
On Tue, Apr 9, 2013 at 9:06 AM, Javier Mr <jav...@ym...> wrote: > Hi, > > Thanks for your response. But, as i have understand, with that aproach i need to subclass wx (affordable) and connect my native app directly with wxWidgets; this is not desirable in my case since my app will mostly run in a terminal just with a text interface and in certain cases bring up the GUI. Doing that would imply that i have to compile against wxWidgets and also the i would have one dependency more in the proyect. You might want to consider using a plugin type architecture for the data/status handler. In your Lua work module you provide a function that allows people to register functions to use as callbacks when new data is available. On new data/status the work module loops through the list of handler functions and calls them. This separates the wxLua part from your worker code and in the function you push from wxLua you call wxPostEvent with whatever upvalues you need to make it work... Regards, John |