- }
- if (!m_serialObj) {
- m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
-
- if (!m_serialObj) {
- wxLogError(_("Can't find the serialization object '%s' "
- "for the object '%s'."),
- obj_name.c_str(),
- GetClassInfo()->GetClassName());
- return;
- }
- m_serialObj->SetObject(this);
- }
-
- m_serialObj->StoreObject(stream);
-}
-
-void wxObject::LoadObject( wxObjectInputStream& stream )
-{
-#if defined(__WXDEBUG__) || wxUSE_DEBUG_CONTEXT
- DEBUG_PRINTF(wxObject::LoadObject)
-#endif
-
- wxString obj_name = wxString(GetClassInfo()->GetClassName()) + "_Serialize";
- wxLibrary *lib = wxTheLibraries.LoadLibrary("wxserial");
-
- if (!m_serialObj) {
- m_serialObj = (WXSERIAL(wxObject) *)lib->CreateObject( obj_name );
-
- if (!m_serialObj) {
- wxLogError(_("Can't find the serialization object '%s' "
- "for the object '%s'."),
- obj_name.c_str(),
- GetClassInfo()->GetClassName());
- return;
- }
- m_serialObj->SetObject(this);
- }