Results 1 to 1 of 1

Thread: Another Scope Question

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2007

    Thumbs up Another Scope Question

    FIXED: As per usual, as soon as I posted I found the answer. My syntax was wrong, this works:

    click:{scope:this.controller, fn:this.controller.nodeClick}


    I have a tree, and I am trying to attach a listener on a click event. I can get the click event to fire, but I can not get the scope setting to work. My psudeo code is:

    this.projectTree = new Ext.tree.TreePanel({
     title: 'Project Browser',
     region: 'west',
     listeners: {
     'click': this.controller.nodeClick,
    When the nodeClick method in the controller class runs, the 'this' scope is the tree, not the controller even though the scope was set. What am I missing??
    Last edited by brookd; 2 Feb 2008 at 11:48 AM. Reason: Fixed!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts