On Tue, May 6, 2008 at 5:16 AM, Éjjeli Őrjárat <[EMAIL PROTECTED]> wrote: > Hi all! > I am developing an application, which uses wxLUA and LUA-AIO for > multithreading. I fill a wxListCtrl in it, but on Unix (on Windows no!) it > causes a crash with these errors: http://dcpp.hu/images/error.png I don't > know if it's wxLUA or LUA-AIO or rather Unix x11 related.. If I click to an > another tab, it fills about 300 elements, but then the whole application > freezes. I hope somebody can help me...
You cannot create or modify GUI elements from any other thread than the main one. This is a restriction of both the GTK and MSW gui libs that wxWidgets wraps. I have not used LUA-AIO, but if you can send a signal to the main thread to update the GUI that could work. This is typically done by calling wxEvtHandler::AddPendingEvent(wxEvent). Note that wxWindow is derived from the wxEvtHandler class so you can use the main wxFrame to handle these delayed messages. The wxEvent you send will be some "fake" event, maybe a generic wxCommandEvent of type wxEVT_COMMAND_BUTTON_CLICKED (or whatever) with a unique id and perhaps the command you want to implement as the string member. Hope this helps, 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/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users