+ if ( wxClassInfo::sm_classTable )
+ {
+ wxClassInfo *info = (wxClassInfo *)wxClassInfo::sm_classTable->Get(name);
+ return info ? info->CreateObject() : NULL;
+ }
+ else // no sm_classTable yet
+ {
+ for ( wxClassInfo *info = wxClassInfo::sm_first;
+ info;
+ info = info->m_next )
+ {
+ if (info->m_className && wxStrcmp(info->m_className, name) == 0)
+ return info->CreateObject();
+ }
+
+ return NULL;
+ }
+}
+
+
+// ----------------------------------------------------------------------------
+// wxObject
+// ----------------------------------------------------------------------------
+
+// Initialize ref data from another object (needed for copy constructor and
+// assignment operator)
+void wxObject::InitFrom(const wxObject& other)
+{
+ m_refData = other.m_refData;
+ if ( m_refData )
+ m_refData->m_count++;
+}