title: cometd hello world example with dojo
body: <p>I'm trying to follow the basic cometd example here: <a href="http://dojotoolkit.org/reference-guide/1.7/dojox/cometd.html" rel="nofollow">http://dojotoolkit.org/reference-guide/1.7/dojox/cometd.html</a></p>
  
  <p>It's using the old module loader so I tried the equivalent as follows:</p>
  
  <pre><code>require(["dojo/ready","dojo/io/script","dojox/cometd","dojox/cometd/callbackPollTransport"], function(ready, dontcare, cometd) {
      ready(function(){   
          cometd.init('http://localhost:8080/MyCometD/cometd');
          comted.subscribe("/test", function(msg){
              console.debug(msg);
          });
      });
  });
  </code></pre>
  
  <p>This doesn't work and I think it has to do with loading modules - there is some sort of silent error as the code within the ready function does not execute at all. What I found is that when the "dojox/cometd" require statement is present, the code within the ready function does not execute.</p>
  
  <p>Running example: <a href="http://jsfiddle.net/Q9W8f/2/" rel="nofollow">http://jsfiddle.net/Q9W8f/2/</a></p>
  
  <p>Example with dojox/comted removed: <a href="http://jsfiddle.net/mMs2h/4/" rel="nofollow">http://jsfiddle.net/mMs2h/4/</a></p>
  
  <p>I haven't worked with the new module loader that much so I bet I just have some simple misconception.</p>
  
  <p>Help!</p>