-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems in bindings using Labels with ContainerDataBinding #847
Comments
Hi Raul, I recreated this example and I think this is right at the moment. You have a View (ApplicationResponsiveView) that must use ViewDataBinding (not ContainerDataBinding). Let me know if I could be wrong in something but with the info provided I can't see a real problem. Thanks |
I uploaded here the project I recreated with the problem, so we can go over it if I missed something: https://royale.codeoscopic.com/bindingproblem.zip |
Hi Carlos, The problem is the same if you have a container, for example a Group. If you use a container, you should use a ContainerDataBinding, but you would have the same problem. Then you have to use ViewDataBinding to make it work. |
Today while doing some jewel docs for views and responsive views I notice that in TDJ I used |
I have discovered a bug in bindings in a very specific case.
I use Crux and Jewel.
The bug appears when it's used Labels and ContainerDataBinding.
The text variable of Label has to be bound with a variable from an object declared in the model. And this object is updated by going through an array declared also in the model.
As we update the object, many listeners are created which slow down the update. If we use a ViewDataBinding, the problem disappears. And this does not happen in other components such as TextInputs.
I have created a small example so that it can be reproduced. Yo have to click in Next button and update slows down as you click the button. If you pause debugging, you can check all listeners in listenermap.js:
View:
Model:
Controller:
TestItem Class:
Thanks!!
The text was updated successfully, but these errors were encountered: