Re: cross-thread update requests
Robert Roebling <[email protected]> Fri, 13 May 2005 02:04:27 +0200
| Newsgroups | gmane.comp.lib.wxwindows.wxnet |
|---|---|
| Message-ID | <[email protected]> |
nummish wrote: > this.EventHandler.AddPendingEvent(new UpdateUIEvent(_GuiUiId)); > where _GuiUiId is assigned in the constructor by calling this.UniqueID(); The wxUpdateUI event is not the right event for calling Refresh() on some window. Just send a command event with a new event type to the window to be refreshed and catch the event there. Robert > > > On 5/12/05, Greg Hewgill <[email protected]> wrote: > > > > > > I'm writing an application that has a GUI and needs to have a separate > > network communications thread (the network communications will often block > > so it's not appropriate to do the network stuff in the UI thread). What I > > need to do is send some kind of request to the associated GUI window to > > update the display when new information is retrieved from the network. I was > > calling Refresh() on the associated Window object, but that seems to be > > causing lockups and crashes. It looks like I need to use AddPendingEvent() > > but I'm not sure what kind of event is appropriate for this type of thing, > > or whether such an event type already exists. > > > > What's the usual way of doing this? > > > > Greg Hewgill > > > ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click