Re: Thread-safe GUI updates
nummish <[email protected]> Fri, 15 Apr 2005 08:53:23 -0400
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
Don't use an abstract event. I use the UpdateUIEvent. In the constructor, I'll assign my custom event an ID: _Update1 = Window.UniqueID; Then in the code, I'll call: EventHandler.AddPendingEvent(new UpdateUIEvent(_Update1)); (full test code I wrote at www.0x90.org/~nummish/wx/EventTest.cs) Hope that helps. -nummish On 4/15/05, Michael Hansen <[email protected]> wrote: > I'm working on a project that uses multiple threads that signal the > GUI for various UI updates. The best way I've read to do this is to > post an event to the main window's event queue and process it on the > main thread. It looks like AddPendingEvent or ProcessEvent would be > likely candidates for doing this. > > Upon inspection, however, both take a wx.Event parameter that has a > single constructor with an IntPtr. Is this the correct way to do > this? I would imagine one would derive a class from wx.Event and pass > in the custom class. Has anyone else solved this issue? > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id396&opclick > _______________________________________________ > wxnet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wxnet-users > -- Bigger 1:23 This address if for mailing list traffic only. Please direct non-list correspondence to 0x90.org ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click