wxPostEvent Segmentation Fault when not in wxThread Entry() method

AzureBell mark63 at azurebell.co.nz
Wed Jan 2 17:54:06 PST 2008


I want to post a simple event to my MainFrame (to a TextCtrl) from my worker
thread. When I do this from within the Entry() method in my thread all is
fine. But if I try to do it from another method then I get a segmentation
fault every time! Can anyone advise what the problem might be?

MY code is :

wxCommandEvent event(wxEVT_ME_EVENT);
event.SetString("Howdy\n");
wxPostEvent( m_MainWindow, event);

I have a pointer to m_MainWindow saved in my thread class.

Mark

-- 
View this message in context: http://www.nabble.com/wxPostEvent-Segmentation-Fault-when-not-in-wxThread-Entry%28%29-method-tp14590443p14590443.html
Sent from the wxWidgets - Users mailing list archive at Nabble.com.




More information about the wx-users mailing list