Fix wrong use of EVT_COMMAND in the example in wxThread documentation.

As the event being defined is a wxThreadEvent, EVT_THREAD must be used.

Also rename wxEVT_COMMAND_MYTHREAD_UPDATE to myEVT_THREAD_UPDATE to avoid
using "wxEVT_" prefix reserved by wx itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74159 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-06-11 12:25:00 +00:00
parent 93a16a7d51
commit 285f511671

View File

@ -277,7 +277,7 @@ public:
Example:
@code
wxDECLARE_EVENT(wxEVT_COMMAND_MYTHREAD_UPDATE, wxThreadEvent);
wxDECLARE_EVENT(myEVT_THREAD_UPDATE, wxThreadEvent);
class MyFrame : public wxFrame, public wxThreadHelper
{
@ -310,9 +310,9 @@ public:
wxDECLARE_EVENT_TABLE();
};
wxDEFINE_EVENT(wxEVT_COMMAND_MYTHREAD_UPDATE, wxThreadEvent)
wxDEFINE_EVENT(myEVT_THREAD_UPDATE, wxThreadEvent)
wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_COMMAND(wxID_ANY, wxEVT_COMMAND_MYTHREAD_UPDATE, MyFrame::OnThreadUpdate)
EVT_THREAD(wxID_ANY, myEVT_THREAD_UPDATE, MyFrame::OnThreadUpdate)
EVT_CLOSE(MyFrame::OnClose)
wxEND_EVENT_TABLE()