Upgrade to ExtJS 3.1.0 - Released 12/16/2009
[extjs.git] / docs / source / TreeEditor.html
index e53ea8a..c5f83bc 100644 (file)
@@ -1,17 +1,12 @@
-<html>
-<head>
-  <title>The source code</title>
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body  onload="prettyPrint();">
-    <pre class="prettyprint lang-js">/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
- * licensing@extjs.com
- * http://www.extjs.com/license
- */
-<div id="cls-Ext.tree.TreeEditor"></div>/**
+<html>\r
+<head>\r
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    \r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <pre class="prettyprint lang-js"><div id="cls-Ext.tree.TreeEditor"></div>/**
  * @class Ext.tree.TreeEditor
  * @extends Ext.Editor
  * Provides editor functionality for inline tree node editing.  Any valid {@link Ext.form.Field} subclass can be used
  * @class Ext.tree.TreeEditor
  * @extends Ext.Editor
  * Provides editor functionality for inline tree node editing.  Any valid {@link Ext.form.Field} subclass can be used
@@ -76,12 +71,18 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
     editDelay : 350,
 
     initEditor : function(tree){
     editDelay : 350,
 
     initEditor : function(tree){
-        tree.on('beforeclick', this.beforeNodeClick, this);
-        tree.on('dblclick', this.onNodeDblClick, this);
-        this.on('complete', this.updateNode, this);
-        this.on('beforestartedit', this.fitToTree, this);
+        tree.on({
+            scope: this,
+            beforeclick: this.beforeNodeClick,
+            dblclick: this.onNodeDblClick
+        });
+        this.on({
+            scope: this,
+            complete: this.updateNode,
+            beforestartedit: this.fitToTree,
+            specialkey: this.onSpecialKey
+        });
         this.on('startedit', this.bindScroll, this, {delay:10});
         this.on('startedit', this.bindScroll, this, {delay:10});
-        this.on('specialkey', this.onSpecialKey, this);
     },
 
     // private
     },
 
     // private
@@ -163,7 +164,15 @@ Ext.extend(Ext.tree.TreeEditor, Ext.Editor, {
             e.stopEvent();
             this.completeEdit();
         }
             e.stopEvent();
             this.completeEdit();
         }
+    },
+    
+    onDestroy : function(){
+        clearTimeout(this.autoEditTimer);
+        Ext.tree.TreeEditor.superclass.onDestroy.call(this);
+        var tree = this.tree;
+        tree.un('beforeclick', this.beforeNodeClick, this);
+        tree.un('dblclick', this.onNodeDblClick, this);
     }
     }
-});</pre>
-</body>
+});</pre>    \r
+</body>\r
 </html>
\ No newline at end of file
 </html>
\ No newline at end of file