- const wxObject *iterobj = obj ;
- const wxDynamicObject* dynobj = dynamic_cast< const wxDynamicObject* > (iterobj ) ;
- if ( dynobj )
- iterobj = dynobj->GetSuperClassInstance() ;
- const wxClassInfo** parents = ci->GetParents() ;
- for ( int i = 0 ; parents[i] ; ++ i )
+ wxString name = ci->GetCreateParamName(i) ;
+ const wxPropertyInfo* prop = map.find(name)->second ;
+ wxASSERT_MSG( prop , wxT("Create Parameter not found in declared RTTI Parameters") ) ;
+ WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ;
+ map.erase( name ) ;
+ }
+
+ for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter )
+ {
+ const wxPropertyInfo* prop = iter->second ;
+ if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH )
+ {
+ WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ;
+ }
+ }
+
+ for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter )
+ {
+ const wxPropertyInfo* prop = iter->second ;
+ if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) )