squ3lch
17 Jun 2010, 12:14 PM
Ext version tested:
Ext 3.2.1
Adapter used:
prototype
css used:
default ext-all.css
Browser versions tested against:
IE7
FF3
Operating System:
WinXP Pro
Description:
When using closeAction:"close" to destroy a window, the window object is not destroyed, and therefore cannot be recreated later. In the example below, "testWin" remains defined as an object after the window is closed. As I understand the documentation, using "close" should completely destroy the object and all items contained therein. If I'm wrong about how this is supposed to work I apologize in advance.
Test Case:
Ext.onReady(function(){
Ext.QuickTips.init();
var testCfg = {
xtype:'window',
closeAction:'close',
title:'test',
layout:'form',
shadow:'drop',
draggable:false,
resizable:false,
bodyStyle:{padding:'5px'},
width:350,
items:[
{
xtype:'textfield',
fieldLabel:'test',
width:200
}
]
};
var mainWindow = new Ext.Viewport({
layout:'border',
items:[
{
region:'center',
items:[
{
xtype:'button',
text:'Click Me',
handler:function(){
if (typeof(testWin)=='undefined') testWin = Ext.ComponentMgr.create(testCfg);
testWin.show();
}
}
]
}
]
});
mainWindow.doLayout();
});
Ext 3.2.1
Adapter used:
prototype
css used:
default ext-all.css
Browser versions tested against:
IE7
FF3
Operating System:
WinXP Pro
Description:
When using closeAction:"close" to destroy a window, the window object is not destroyed, and therefore cannot be recreated later. In the example below, "testWin" remains defined as an object after the window is closed. As I understand the documentation, using "close" should completely destroy the object and all items contained therein. If I'm wrong about how this is supposed to work I apologize in advance.
Test Case:
Ext.onReady(function(){
Ext.QuickTips.init();
var testCfg = {
xtype:'window',
closeAction:'close',
title:'test',
layout:'form',
shadow:'drop',
draggable:false,
resizable:false,
bodyStyle:{padding:'5px'},
width:350,
items:[
{
xtype:'textfield',
fieldLabel:'test',
width:200
}
]
};
var mainWindow = new Ext.Viewport({
layout:'border',
items:[
{
region:'center',
items:[
{
xtype:'button',
text:'Click Me',
handler:function(){
if (typeof(testWin)=='undefined') testWin = Ext.ComponentMgr.create(testCfg);
testWin.show();
}
}
]
}
]
});
mainWindow.doLayout();
});