[Qt-interest] Problem about QScript
Xiaolei Shang
xiaolei.shang at cobham.com
Mon Dec 13 10:16:42 CET 2010
Hi:
> Hi everyone,
> is someone familiar with QScript?
> And do you know what usually causes the following error meesage?
>
> TypeError: Result of expression 'canvas' [undefined] is not an object.
>
> My code is
>
> var canvas = document.getElementById('tutorial');
> var ctx = canvas.getContext('2d');
>
> The error is throwed in the second line. But I have checked
> IsObject(), the value is True, IsUndefined(), the value is False.
> Thanks a lot !
It looks like that the function getElementById() doesnot return an
invalid value. You'd better check the C++ definition of getElementById()
to see if there is valid value returned.
Cheers
Xiaolei
>
> --
> Best regards
> Li Zhongmiao
> Digital Media, College of Computer Science, Zhejiang University
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101213/750fa139/attachment.html
More information about the Qt-interest-old
mailing list