Results 1 to 2 of 2

Thread: TreeNodeUI beforeclick event cancelation not working

  1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    8
    Vote Rating
    0
      0  

    Default TreeNodeUI beforeclick event cancelation not working

    I was trying to intercept the click event on a TreeNode using the beforeclick event in TreeNodeUI. I need to check some conditions and cancel the node click in certain cases (such as if the user will be abandoning unsaved work). However, as it is currently implemented, TreeNodeUI's fireEvent method swallows the event handler's return
    Code:
    fireEvent : function(){
      this.node.fireEvent.apply(this.node, arguments);  
    }
    When I changed the above to
    Code:
    fireEvent : function(){
      return this.node.fireEvent.apply(this.node, arguments);  
    }
    everything seems hunky dunky.
    On a related note, why doesn't TreeNodeUI extend Observable? If it did, it would get this functionality for free.
    Keep up the amazing work.

    Justin

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    Thanks, that indeed is a bug.

    You could extend TreeNodeUI to add Observable type functionality if you wanted to. It doesn't currently to keep the API clean. You can listen on a node, or on the tree. Adding in a 3rd listening spot seems like extra complexity IMO but I could be wrong.

Similar Threads

  1. how to stop click event when having dblclick event
    By seldon in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 8 Nov 2011, 12:31 AM
  2. ComboBox not working with IE6
    By liotrox in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 8 Mar 2007, 5:11 AM
  3. autoSizeColumns not working!!
    By n01champion in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 20 Feb 2007, 11:34 PM
  4. Tree 'selectionchange' event is not working
    By liotrox in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 5 Jan 2007, 9:20 AM
  5. YUI-EXT BorderLayout not working in IE
    By saasira in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 20 Dec 2006, 9:12 PM

Posting Permissions

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