Search found 4 matches

by tandr
08 May 2024, 11:17
Forum: General Discussion
Replies: 6
Views: 4164

Re: Implementing Dynamic Data Binding from JSON

Got it fixed by adding base type on TypeBuilder : ty_builder->AddBase(TypeOf<NotifyPropertyChangedBase>()); and the binding works now (yay!), although I'm still not sure how to attach multiple view models to the tree root. I would imagine if I set the JsonObject instance in the root resources, somet...
by tandr
08 May 2024, 09:27
Forum: General Discussion
Replies: 6
Views: 4164

Re: Implementing Dynamic Data Binding from JSON

Hey, if I set the JsonObject instance as the DataContext Noesis complains about incompatible types: ERROR > Value cannot be assigned to the property 'UserControl.DataContext' (property has type 'BaseComponent', value has type 'Player') So perhaps I'm missing the reflection bits that would allow Noes...
by tandr
07 May 2024, 18:40
Forum: General Discussion
Replies: 6
Views: 4164

Re: Implementing Dynamic Data Binding from JSON

Hey @jsantos, This is very helpful. Thanks a lot for providing direction! So far following your advice I was able to come up with a code like this: class JsonObject : public NoesisApp::NotifyPropertyChangedBase { public: JsonObject(const json& data, const TypeClass* type) : _data(data), _type(ty...
by tandr
29 Apr 2024, 18:53
Forum: General Discussion
Replies: 6
Views: 4164

Implementing Dynamic Data Binding from JSON

Hello, I am involved in a project where the primary game logic is developed in Rust, and we look into possibly using NoesisGUI as a UI middleware. Typically, NoesisGUI expects data models to be statically defined in C++ subclasses, with specific properties (like Name and Health for a Player). Howeve...