I have been playing around with processing.js (http://processingjs.org) and 
I tried to embed a simple hello world example into a GWT application. 
However it doesn't work. Nothing is displayed. Everything seems to be fine 
(javascript library is correctly loaded, canvas elements is in the DOM). 

I tried to debug it and it the Processing script uses following call to init 
the processing example (canvas, etc):

 document.addEventListener('DOMContentLoaded', function() {
    init();
  }, false);

In the init function all canvas elements of the DOM are retrieved and passed 
to a new Processing instance. 

var canvas = document.getElementsByTagName('canvas');

    for (var i = 0, l = canvas.length; i < l; i++) {
   }

When I debug this line with Firebug I realize that 
document.getElementsByTagName('canvas') returns an empty array. 
I have put the canvas declaration in a HTMLPanel in a UIBinder file.
I also tried the onLoad method but I get the same behavior. Maybe somebody 
has an idea what's wrong.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to