<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
if(text){\r
this.updateText(text);\r
}\r
- if(this.rendered){\r
+ if(this.rendered && !this.isDestroyed){\r
var w = Math.floor(value*this.el.dom.firstChild.offsetWidth);\r
this.progressBar.setWidth(w, animate === true || (animate !== false && this.animate));\r
if(this.textTopEl){\r
this.waitTimer = Ext.TaskMgr.start({\r
run: function(i){\r
var inc = o.increment || 10;\r
+ i -= 1;\r
this.updateProgress(((((i+inc)%inc)+1)*(100/inc))*0.01, null, o.animate);\r
},\r
interval: o.interval || 1000,\r
if(this.textTopEl){\r
this.textTopEl.addClass('x-hidden');\r
}\r
+ this.clearTimer();\r
+ if(hide === true){\r
+ this.hide();\r
+ }\r
+ return this;\r
+ },\r
+ \r
+ // private\r
+ clearTimer : function(){\r
if(this.waitTimer){\r
this.waitTimer.onStop = null; //prevent recursion\r
Ext.TaskMgr.stop(this.waitTimer);\r
this.waitTimer = null;\r
}\r
- if(hide === true){\r
- this.hide();\r
+ },\r
+ \r
+ onDestroy: function(){\r
+ this.clearTimer();\r
+ if(this.rendered){\r
+ if(this.textEl.isComposite){\r
+ this.textEl.clear();\r
+ }\r
+ Ext.destroyMembers(this, 'textEl', 'progressBar', 'textTopEl');\r
}\r
- return this;\r
+ Ext.ProgressBar.superclass.onDestroy.call(this);\r
}\r
});\r
Ext.reg('progress', Ext.ProgressBar);</pre> \r