Scope resolution question

Anton Kreuzkamp kde-development at akreuzkamp.de
Tue Jun 16 09:04:35 UTC 2015


Hi Pavel,

That should have worked and was actually a bug, that even made a test fail. 
It's now fixed and so all my tests work again. :)

Cheers, Anton

PS: Are you registered to the mailinglist?

On Friday 12 June 2015 11:54:52 Pavel Vasev wrote:
> Hi Anton!
> 
> Please consider the example:
> 
> *********************** main.qml
> import QtQuick 2.3
> 
> RectWithFoo {
>   color: "green"
> 
>   Text {
>     text: "foo="+foo
>   }
> }
> *********************** RectWithFoo.qml
> import QtQuick 2.3
> Rectangle {
>   property var foo: 15
> }
> ***********************
> 
> When I run this example via qmlscene of Qt project, all works.
> When I run it via qmlweb, I get "foo is undefined" error during text eval.
> 
> I tried to "fix" it and failed, because I cannot understand how scope
> variables (e.g. componentScope e.g. context)  are collected..
> 
> Could you please explain, how and where context is gathered?
> 
> If I understand it, probably I will find the way how to insert "internal"
> properties of component root object to that scope.
> 
> Best Regards,
> Pavel

-- 
Kind regards to the NSA.


More information about the QmlWeb mailing list