Setting default typeconverter?
Is it possible to set a default TypeConverter for a property or object like you can in C# (so I don't have to specify a converter every time i bind)?
-
sfernandez
Site Admin
- Posts: 3154
- Joined:
Re: Setting default typeconverter?
Yes, it can be specified in the reflection block:
Where "SomeConverter" is the TypeId used to register the Converter in Noesis.
Code: Select all
NS_IMPLEMENT_REFLECTION(SomeType)
{
//...
NsProp("SomeProperty", &SomeType::GetSomeProperty, &SomeType::SetSomeProperty)
.Meta<TypeConverterMetaData>("SomeConverter");
//...
}
Who is online
Users browsing this forum: Bing [Bot] and 0 guests