So…
Previously ive mainly been using properties to send data to my module.
Even for something that should been a function (like if i turn on a boolean in the props it runs a javascript and then turns the prop back to false) ((yes kinda bad but this was before ive started using the gatewaydelegate))
Anyways that all worked fine. But now i created a @ScriptCallable function in the delegate that runs some javascript that changes a property.
That all works fine, i can call the script on a button and such with no problem.
But now…
I’ve added this function to a onchange script of a viewParam. And then i have a binding to the property changed by the @ScriptCallable function.
But the binding only triggers 8/10 times eventho the property has changed. Since it seemed to happen at random ive added a time.sleep(1) to the viewparam onchange script and now it seems to work consistent.
Could it be that changing the property through this scriptcallable is so fast it somehow doesnt get triggered in the very startup of the view? Or what could be the cause? Kinda hard to debug since it doesnt seem to happen all the time.
Should i put a delay in the scriptcallable? or is there something there that tells me if inital bindings have gotten loaded
Ive also noticed that quickly doing
props.x = True
props.x = False
Doesnt seem to trigger the True in my js, which seemed normal to me, Its traffic from gateway to client afterall. But is it the gateway thats not sending/buffering it or the client that isnt?
(i first tried this for turning on the boolean but then i let the javascript turn it back to false)