Re: [Interest] Qml bindings with javascript library functions in them

2013-06-13 Thread Josh Faust
On Thu, Jun 13, 2013 at 11:41 AM, Alan Alpert <4163654...@gmail.com> wrote: > Bindings do not update when a purely JS variable changes, it can only > respond to changes in QML properties. You could bind to something like > stateObject.value, and still be able to use > JS.setValue(stateObject.valu

Re: [Interest] Qml bindings with javascript library functions in them

2013-06-13 Thread Alan Alpert
Bindings do not update when a purely JS variable changes, it can only respond to changes in QML properties. You could bind to something like stateObject.value, and still be able to use JS.setValue(stateObject.value + 1) if you wanted. But without going through C++ though you couldn't make stateObj

[Interest] Qml bindings with javascript library functions in them

2013-06-13 Thread Josh Faust
Hey all, I have a javascript library, with functions that are used in a lot of bindings. I'm trying to get those bindings to reevaluate when some variables used inside the functions change. A simple example: // JS.js .pragma library var _Value = 0; function getValue() { return _Value; } functi