[Qt-qml] JavaScript with .pragma library cannot see Component object
ext-ivailo.iliev at nokia.com
ext-ivailo.iliev at nokia.com
Fri Nov 19 17:17:51 CET 2010
Hi,
I'm trying to create JS library with QML. As written in the documentation I write in the beginning of the JS file .pragra library
everything is ok - now my library is not stuck to one QML file and I can everything is ok
the problem is that I cannot see Component.Ready and Component - it's not null, but I have error directly when I want to access it :
ReferenceError: Can't find variable: Component.
if I remove the .pragma library then everything is ok - I can see Component and Comonent.Ready
My question is:
Is it done on purpose? Is there any reason why I cannot use / and see / those objects in the library is "object". Just a quick tip - Qt object is there - I can see it with or without marking my JS as library.
For now I can just "wrap" the error - as Component.Ready is 1 - I will just replace it with 1, but it will be nice if I know what else I can and cannot do with libraries and not.
Best Regards,
Ivo
More information about the Qt-qml
mailing list