X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16cafacf24efe3b5a2040adc5fadca9a9a5f77a9..7c2b62db9173af22dc81aad5e26cbcbc4f2a6645:/samples/sockets/client.cpp diff --git a/samples/sockets/client.cpp b/samples/sockets/client.cpp index 33993489aa..1536ecef8a 100644 --- a/samples/sockets/client.cpp +++ b/samples/sockets/client.cpp @@ -17,11 +17,6 @@ // headers // -------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(__APPLE__) -# pragma implementation "client.cpp" -# pragma interface "client.cpp" -#endif - // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" @@ -112,9 +107,9 @@ private: enum { // menu items - CLIENT_QUIT = 1000, - CLIENT_ABOUT, - CLIENT_OPEN, + CLIENT_QUIT = wxID_EXIT, + CLIENT_ABOUT = wxID_ABOUT, + CLIENT_OPEN = 100, CLIENT_TEST1, CLIENT_TEST2, CLIENT_TEST3, @@ -159,6 +154,9 @@ IMPLEMENT_APP(MyApp) bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + // Create the main application window MyFrame *frame = new MyFrame(); @@ -290,7 +288,7 @@ void MyFrame::OnOpenConnection(wxCommandEvent& WXUNUSED(event)) // // Connect(addr, false) will issue a nonblocking connection request // and return immediately. If the return value is true, then the - // connection has been already succesfully established. If it is + // connection has been already successfully established. If it is // false, you must wait for the request to complete, either with // WaitOnConnect() or by watching wxSOCKET_CONNECTION / LOST // events (please read the documentation). @@ -585,7 +583,7 @@ void MyFrame::OnTestURL(wxCommandEvent& WXUNUSED(event)) wxYield(); // Get the data - wxFile fileTest(wxT("test.url")); + wxFile fileTest(wxT("test.url"), wxFile::write); wxFileOutputStream sout(fileTest); if (!sout.Ok()) {