Ugly bug in bindings
Pavel Vasev
pavel.vasev at gmail.com
Mon Mar 2 16:51:25 UTC 2015
Dear Anton!
Please look at following example:
----------------------------------------------- main.qml
import QtQuick 1.1
Rectangle {
anchors.fill: parent
color: "green"
Subitem {
id: qSome
coords: [5,2,3]
}
}
----------------------------------------------- Subitem.qml
Item {
id: origin
property var coords: parent.coords
// maybe parent will have coords property?
// if not, we consider that implementor of Subitem object will specify
coords directly
// see above, we set coords property to [5,2,3]
property var positions: make()
function make() {
console.log("called make, coords=",origin.coords );
return origin.coords;
}
}
-----------------------------------------------
The result of that code should be seen in console.
We see:
called make, coords= undefined
But the correct result should be:
called make, coords= [5,2,3]
Maybe, I misunderstand something?
Best Regards,
Pavel Vasev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/qmlweb/attachments/20150302/ffb85ba4/attachment.html>
More information about the QmlWeb
mailing list