<div dir="ltr">Hi Anton!<div><br></div><div>Many thanks to you for the fix! I tested on my cases and all is OK now.</div><div><br></div><div>------------------------------------<br></div><div><br></div><div>Because we are already in bindings fixing, I would like to ask you to look at another strange situation</div><div><br></div><div>***********************</div><div><div>import QtQuick 1.1</div><div><br></div><div>Rectangle {</div><div>  width: 100</div><div>  height: 100</div><div>  color: "green"</div><div>  </div><div>  property var pos: make()</div><div>  property var nodes: [1,2,width]</div><div><br></div><div>  function make() {</div><div>    console.log("called make, nodes=",nodes);</div><div>    return nodes;</div><div>  }</div><div>  </div><div>}</div></div><div>***********************<br></div><div><br></div><div>If you open this exampe, you will see that `called make` message is logged twice to the console. </div><div><br></div><div><div>called make, nodes= undefined</div><div>called make, nodes= [1, 2, 100]</div></div><div><br></div><div>As I understand, this is because bindings are evaluated in some order during init.</div><div>And when binding eval uses another binded property, of which binding is not initialized, the first one gets "undefined value".</div><div><br></div><div>As a variant, I think binding eval shoul be recursive (with loop detection build in it). </div><div><br></div><div>If you want, I may try to fix it by myself. In that case, please confirm that `recursive idea` is right. </div><div><br></div><div><br></div><div class="gmail_extra"><br clear="all"><div><div>С уважением,<br>Павел Васёв</div></div>
<br><div class="gmail_quote">2015-03-03 13:37 GMT+05:00 Anton Kreuzkamp <span dir="ltr"><<a href="mailto:akreuzkamp@web.de" target="_blank">akreuzkamp@web.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">uh, nice one.<br>
<br>
The problem was, that the binding was overwritten with a constant value. But<br>
bindings are always evaluated last. Thus the binding won.<br>
<br>
Fixed by properly removing the binding, when being overwritten.<br>
<br>
Please test again with your code.<br>
<br>
Cheers, Anton<br>
<div><div><br>
On Monday 02 March 2015 21:51:25 you wrote:<br>
> Dear Anton!<br>
><br>
> Please look at following example:<br>
><br>
> ----------------------------------------------- main.qml<br>
> import QtQuick 1.1<br>
><br>
> Rectangle {<br>
>   anchors.fill: parent<br>
>   color: "green"<br>
><br>
>   Subitem {<br>
>     id: qSome<br>
>     coords: [5,2,3]<br>
>   }<br>
> }<br>
><br>
> ----------------------------------------------- Subitem.qml<br>
> Item {<br>
>     id: origin<br>
>     property var coords: parent.coords<br>
>     // maybe parent will have coords property?<br>
>     // if not, we consider that implementor of Subitem object will specify<br>
> coords directly<br>
>     // see above, we set coords property to [5,2,3]<br>
><br>
>     property var positions: make()<br>
><br>
>     function make() {<br>
>         console.log("called make, coords=",origin.coords );<br>
>         return origin.coords;<br>
>     }<br>
><br>
> }<br>
> -----------------------------------------------<br>
><br>
> The result of that code should be seen in console.<br>
> We see:<br>
><br>
> called make, coords= undefined<br>
><br>
> But the correct result should be:<br>
><br>
> called make, coords= [5,2,3]<br>
><br>
> Maybe, I misunderstand something?<br>
><br>
> Best Regards,<br>
> Pavel Vasev<br>
<br>
</div></div><span><font color="#888888">--<br>
Gruß auch an die NSA.</font></span></blockquote></div><br></div></div>