I’ve spent two hours reading through the documentation on MVVM, yet this simple system still isn’t working.
I am trying to update an integer on the VM, convert it to text using a function on the VM, and assign it to the widget’s text. As I understand it, the text should update at the same time as the integer; however, the text remains unchanged even after I confirm that the integer within the VM has been updated.
I don’t know where the problem lies or what is missing. I am posting all the screenshots related to the settings, so please let me know if you can identify the cause. I will provide additional information if anything else is needed.
P.S: It seems I can only attach one image at a time.
Hi, you have to manually broadcast the field notify change of the Cash Display method.
E.g. i have a GetInteractionText() method that is marked as Field Notify.
When the underlying interaction object changes, i have to broadcast the value change myself.
It should trigger it automatically but it didnt work for me. So i went with manually calling it
Following your advice, I created the same thing in the VM and tried calling it from the widget’s Construct Event and when the variable updates. However, nothing happens.
As it stands, MVVM is literally doing nothing and appears to be completely broken.
Oh gosh…The reason it didn’t work was very simple.
It was incorrectly bound to the “Set” function of a Text variable, rather than the “Set Text” function of the Text widget. So, while it had been updated internally, the widget wasn’t displaying the change.
But seriously, these two names should be changed because they’re really confusing.