switching to registry based type info

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23186 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2003-08-24 23:41:05 +00:00
parent b6ac8ca0ff
commit 499a9a6222
3 changed files with 97 additions and 80 deletions

View File

@@ -412,8 +412,17 @@ int wxXmlReader::ReadComponent(wxXmlNode *node, wxDepersister *callbacks)
}
else
{
wxxVariant nodeval ;
callbacks->SetProperty( objectID, classInfo ,pi , ReadValue( prop , pi->GetTypeInfo() ) ) ;
wxxVariant nodeval = ReadValue( prop , pi->GetTypeInfo() ) ;
if( pi->GetFlags() & wxPROP_ENUM_STORE_LONG )
{
const wxEnumTypeInfo *eti = dynamic_cast<const wxEnumTypeInfo*>( pi->GetTypeInfo() ) ;
wxASSERT_MSG( eti , wxT("Type must have enum - long conversion") ) ;
long realval ;
eti->ConvertToLong( nodeval , realval ) ;
nodeval = wxxVariant( realval ) ;
}
callbacks->SetProperty( objectID, classInfo ,pi , nodeval ) ;
}
}
}