title: Dojo : ComboBox is not a constructor
body: <p>I am writing on a JavaScript application which uses the <code>dojo Toolkit</code>. I have made a folder in the dojo folder called "md" (My Dojo). There are 2 .js files in there <code>myownclass.js</code> and <code>myComboBox.js</code> . <code>myownclass.js</code> is for retrieving Informations from a <code>SQLite</code> Database by making a dojo Request (works) to <code>sqlaccess.php</code> . firebug is telling me that the request is correct. But the function does not want to go to the function <code>prepare_str(str)</code> and push the string to the Array data : [].</p>
  
  <p>data : [],</p>
  
  <pre><code>constructor : function( ){
          this.getdata();
      },
  
      //gets Data
  getdata : function(){
      xhr("sqlaccess.php?order=0").then(function(text){
                                                                                      this.prepare_str(text.toString().split(";"));});
          return this.data;
      },
      //push Data to Array    
  prepare_str : function(str){
      alert(str);
      for(var index = 0; index &lt; str.length; index++)
      {
          data.push({name:str[index], id: index});
      }
      //get
      },
  </code></pre>
  
  <p>the full code you can see in: <a href="http://pastebin.com/aKUrLmcH" rel="nofollow">http://pastebin.com/aKUrLmcH</a></p>
  
  <p>and the other error is in <code>myComboBox.js</code> where it tells me that new ComboBox() is not a constructor</p>
  
  <pre><code>MyMemory : null,
          comboBox : null,
          //keyhandle : null,
  
          oldval : "",
          constructor: function(){
              this.MyMemory = new myownclass();
              var stateStore = new Memory({data : this.MyMemory.data});
              comboBox = new ComboBox({
                              id: "stateSelect",
                              name: "state",
                              value: "",
                              store: stateStore,
                          searchAttr: "name"
                          }, "stateSelect");
                  var handle = on(dom.byId("stateSelect"),"keyup", this.keyupfoo);        
              },
  </code></pre>
  
  <p>the full code is readable here: <a href="http://pastebin.com/hi8nkymf" rel="nofollow">http://pastebin.com/hi8nkymf</a></p>
  
  <p>Can anyone see the error I am making?</p>
  
  <p>Thanks for help</p>