title: dojo declare constructor: object member reference undefined
body: <p>I have no idea why I get into troubles, referencing the class member object <code>this.treeStore</code> in the <code>checkAcceptance</code> method of the following piece of code?</p>
  
  <p>Code Snippet (<a href="http://jsfiddle.net/ddev/rn7e3zfb/44/" rel="nofollow">link to a running jsfiddle example...</a>):</p>
  
  <pre><code>dojo.declare("at.delta.util.FolderConfigurator", null, {
      treeStore: null,
      treeModel: null,
      tree: null,
  
      constructor: function (/*string*/ jsonData) {
          this.treeStore = new dojo.data.ItemFileWriteStore({
          data: jsonData
          });
          this.treeModel = new dijit.tree.ForestStoreModel({
             store: this.treeStore // this.treeStore available, perfect no problems
          });  
          this.tree = new dijit.Tree({
             model: this.treeModel,
             showRoot: false,
             betweenThreshold: 5,
             dndController: "dijit.tree.dndSource",
             checkAcceptance: function ( /*Object*/ source, /*Array*/ nodes) {
                 // Here comes the code for drag acceptance
                 var currentNode = dijit.getEnclosingWidget(nodes[0]).item;
                 var parentNode = this.treeStore.getValue(currentNode, 'parent'); // typeError: this.treeStore is undefined
                 return (parentNode &amp;&amp; parentNode.owners !== undefined);
          }
      }, "pnlTree");
    }
  
  });
  </code></pre>
  
  <p>Attempting to drag a node of the tree results in the following error on the firefox/firebug console:</p>
  
  <blockquote>
    <p>TypeError: this.treeStore is undefined</p>
  </blockquote>
  
  <p>Any help will be greatly appreciated :)</p>