storable objects use _() and wxLogXXX instead of message boxes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-01-07 16:25:06 +00:00
parent 2f877010f9
commit 794df945d5

View File

@@ -21,12 +21,16 @@
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/hash.h" #include "wx/hash.h"
#ifdef wxUSE_SERIAL #ifdef wxUSE_SERIAL
#include "wx/objstrm.h" #include "wx/objstrm.h"
#include "wx/serbase.h" #include "wx/serbase.h"
#endif
#endif // for error messages
#include "wx/log.h"
#include "wx/intl.h"
#endif // wxUSE_SERIAL
#endif // WX_PRECOMP
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
@@ -283,19 +287,17 @@ void wxObject::StoreObject( wxObjectOutputStream& stream )
wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial"); wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial");
if (!lib) { if (!lib) {
wxMessageBox("Can't load wxSerial dynamic library.", "Alert !"); wxLogError(_("Can't load wxSerial dynamic library."));
return; return;
} }
if (!m_serialObj) { if (!m_serialObj) {
m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name ); m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
if (!m_serialObj) { if (!m_serialObj) {
wxString message; wxLogError(_("Can't find the serialization object '%s' "
"for the object '%s'."),
message.Printf("Can't find the serialization object (%s) for the object %s", obj_name.c_str(),
WXSTRINGCAST obj_name, GetClassInfo()->GetClassName());
WXSTRINGCAST GetClassInfo()->GetClassName());
wxMessageBox(message, "Alert !");
return; return;
} }
m_serialObj->SetObject(this); m_serialObj->SetObject(this);
@@ -313,12 +315,10 @@ void wxObject::LoadObject( wxObjectInputStream& stream )
m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name ); m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
if (!m_serialObj) { if (!m_serialObj) {
wxString message; wxLogError(_("Can't find the serialization object '%s' "
"for the object '%s'."),
message.Printf("Can't find the serialization object (%s) for the object %s", obj_name.c_str(),
WXSTRINGCAST obj_name, GetClassInfo()->GetClassName());
WXSTRINGCAST GetClassInfo()->GetClassName());
wxMessageBox(message, "Alert !");
return; return;
} }
m_serialObj->SetObject(this); m_serialObj->SetObject(this);