Re: [C++] Visual update on property changed
Posted: 24 Feb 2017, 11:23
Thanks. And Item inherits from BaseComponent?
Welcome to our official discussion site. You’ll find topics on features, bugs, development, and general support here
https://www.noesisengine.com/forums/
class Item: public BaseComponent {
...
NS_IMPLEMENT_INLINE_REFLECTION(Item, BaseComponent) { ... }
};
class CheckItem: public Item, public INotifyPropertyChanged {
...
NS_IMPLEMENT_INLINE_REFLECTION(CheckItem, Item) {
NsMeta<TypeId>("CheckItem");
NsImpl<INotifyPropertyChanged>();
NsProp("IsChecked", &CheckItem::GetIsChecked, &CheckItem::SetIsChecked);
}
};
class Item_model : public CheckItem {
...
NS_IMPLEMENT_INLINE_REFLECTION(Item_model, CheckItem) {
NsMeta<TypeId>("ListItem");
}
};