Circular references in Qml : Should they be flagged or not?
-
Hi, I was trying this code snippet:
@ Text{
id : main_title
text : "Hello Qt from Symbian"
x : rect_man.x
y : 25
font.family: "Arial"
font.pixelSize: 25
}Rectangle{ id: rect_man width : main_title.width color: "red" x: main_title.x y: main_title.y + main_title.font.pixelSize + 5 height: 5 }@
As I had heard in the training videos, circular references would be flagged as warning. But I did not notice any warning while building this code in QtCreator?
Am I doing something wrong or is my code alright? -
I have also seen this.. I feel it should give a run time warning/error . Can you raise a error in JIRA..
-
-JIRA? sorry where is that?-
Edit: Got it. I am checking if similar issue has been raised.
Whoops there are lots of issues. If someone has noticed a similar issue, please answer here. I am not really interested in checking the long list of bugs. -
eminemence, use search :)
-
Hi,
Warnings are raised when an actual binding loop is encountered, but there is no e.g. static analysis to detect circular references. The example code doesn't trigger the warning as both bindings are trying to set the respective values to their natural initial value of 0.
If you'd like to see an example of how the warning is triggered, you can change:
@x: main_title.x@
to
@x: main_title.x + 10@
Regards,
Michael -
ok thanks. It makes sense now.. :)