Re: A few questions about some features
Posted: 13 Mar 2015, 12:17
Hi,
Sorry for the very late answer
I tried your sample and, once added serialization code (see below) to the InventoryTileModel class, it works as expected, inside XamlPlayer and in a external application.
Can I have a look at your serialization code? Mine looks like this:
How do you initialize NoesisGUI and load this xaml in your application?
Have you registered the component in the ComponentFactory before loading the xaml?
Anything you try in XamlPlayer should work the same way in your application, otherwise we have a bug in our code.
Sorry for the very late answer
I tried your sample and, once added serialization code (see below) to the InventoryTileModel class, it works as expected, inside XamlPlayer and in a external application.
Can I have a look at your serialization code? Mine looks like this:
Code: Select all
void Serialize(Noesis::Core::SerializationData* data) const
{
data->Serialize("ItemID", _itemID);
data->Serialize("Quantity", _quantity);
}
void Unserialize(Noesis::Core::UnserializationData* data, NsUInt32 version)
{
data->Unserialize("ItemID", _itemID);
data->Unserialize("Quantity", _quantity);
}
Have you registered the component in the ComponentFactory before loading the xaml?
Code: Select all
extern "C" NS_DLL_EXPORT void NsRegisterReflection(ComponentFactory* factory, NsBool registerComponents)
{
NS_REGISTER_COMPONENT(InventoryTileModel)
}