jfaust at suitabletech.com
Thu Jun 13 21:42:00 CEST 2013
On Thu, Jun 13, 2013 at 11:41 AM, Alan Alpert <416365416c at 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.value + 1) if you wanted. But without going
> through C++ though you couldn't make stateObject.value read-only to
> everything but the setValue function.
Ah, I had forgotten about the distinction between properties and JS
variables. That gave me an idea though, and it looks like it works. I can
_generationObject = obj;
// Force re-evaluation if _GenerationObject.generation changes
if (_GenerationObject.generation != _LastGeneration)
_LastGeneration = _GenerationObject.generation;
_Value = val;
Now the only trick is getting that value set before anything else
constructs, but that should be solveable.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest