title: mootools variable scope
body: <p>how to access outer function's argument 'parent' ??? <strong>please see comments in code
  !!</strong><br /><strong>last edit : This question is misleading, my problem is caused by wrong input argument</strong></p>
  
  <pre><code>renderData : function(parent, children){
              children.each(function(e, index){
                  var li = new Element('li');
                  var hasChildren = false;
                  if(e.children &amp;&amp; e.children.length &gt;0){
                      var img = new Element('img');
                      img.src = 'a1.png';
                      img.inject(li);
                      hasChildren = true;
                  }
                  if(e.icon){
                      var img = new Element('img');
                      img.src = e.icon;
                      img.inject(li);
                  }else{
                      var img = new Element('img');
                      img.src = 'b1.png';
                      img.inject(li);
                  }
                  li.set('html',e.text);
                  console.log(this);
                       // how to access outer function's argument 'parent' ???
                  li.inject(parent);
                  if(hasChildren){
                      var ul = new Element('ul');
                      this.renderData(ul, e.childRen);
                      ul.inject(e);
                  }
              }.bind(this));
  </code></pre>