ExtJS窗口在隐藏后未定义

ExtJS窗口在隐藏后未定义,extjs,window,Extjs,Window,我有一个在页面加载时创建并在组件管理器中注册的窗口。 该窗口设置了closeAction:“hide”,但当我尝试重新打开它时,会出现一个错误,即该窗口未定义。使用ExtJS3.4 #Initial creation of the window var comWin = new UserSelectionDialog(); Ext.ComponentMgr.register(comWin); #Window Class/Config UserSelectionDialog = Ext.exte

我有一个在页面加载时创建并在组件管理器中注册的窗口。 该窗口设置了closeAction:“hide”,但当我尝试重新打开它时,会出现一个错误,即该窗口未定义。使用ExtJS3.4

#Initial creation of the window
var comWin = new UserSelectionDialog();
Ext.ComponentMgr.register(comWin);

#Window Class/Config
UserSelectionDialog = Ext.extend(Ext.Window, {
id: 'comWin',
title: 'User Selection',
width: 700,
height: 300,   
autoScroll: true,
maximizable: true,
closeAction: 'hide'...


#call to retrieve window
function getCom(){

var comWin = Ext.getCmp('comWin');
alert(comWin.title);
    comWin.show();

默认情况下,当您点击“关闭”时,窗口文档中会介绍这一点,它会破坏窗口


我明白了。我的一个函数是调用this.close而不是this.hideRight,我的答案是正确的,无论您是否通过它只调用close的UI关闭它。