Data binding through interface
Are there any plans for making data binding possible by any other way than inheriting from BaseComponent?
For example by implementing an interface (in the same way as INotifyPropertyChanged)?
The need to inherit from BaseComponent really limits the flexibility of how to construct the classes to bind to.
Aside from the above I find your GUI-plugin to be really excellent so far. Congrats on an impressive technique.
///JmD
For example by implementing an interface (in the same way as INotifyPropertyChanged)?
The need to inherit from BaseComponent really limits the flexibility of how to construct the classes to bind to.
Aside from the above I find your GUI-plugin to be really excellent so far. Congrats on an impressive technique.
///JmD
-
-
sfernandez
Site Admin
- Posts: 3203
- Joined:
Re: Data binding through interface
Hi JmD,
Could you please explain which are the limitations you are facing by the necessity of inheriting from BaseComponent?
Maybe we can find a way to solve these limitations.
P.S. Thanks for the nice words
Could you please explain which are the limitations you are facing by the necessity of inheriting from BaseComponent?
Maybe we can find a way to solve these limitations.
P.S. Thanks for the nice words

Re: Data binding through interface
Hello sfernandez,
Thank you for your quick reply. It is always impressive to see such commitment to the users from the developer.
One limiting factor is that my classes need to inherit from MonoBehaviour. I could "break out" all the properties from my classes that I want to data bind to, and put them in separate classes that inherits from BaseComponent. Then I could use composition and "put them back in" again. But that means I need to restructure my complete framework which is something I would like to avoid if possible. But maybe that is the way I need to go?
///JmD
Thank you for your quick reply. It is always impressive to see such commitment to the users from the developer.
One limiting factor is that my classes need to inherit from MonoBehaviour. I could "break out" all the properties from my classes that I want to data bind to, and put them in separate classes that inherits from BaseComponent. Then I could use composition and "put them back in" again. But that means I need to restructure my complete framework which is something I would like to avoid if possible. But maybe that is the way I need to go?
///JmD
Re: Data binding through interface
yes, for now the best approach is using composition. In fact, at first, I would say that even the code is better this way because you separate different concepts (unity script, data binding) in different classes. Could you please post a sample of those behaviours you have that need to be the source of binding?
Anyway, we have to think more about this because this is a deviation from WPF, thing we try to avoid Whenever possible.
Anyway, we have to think more about this because this is a deviation from WPF, thing we try to avoid Whenever possible.
Who is online
Users browsing this forum: No registered users and 6 guests