I'm using Extjs 4.2 and I got a problem.
I created an object "Window_Graph" wich extends "Window". When I try to hide this object, it makes a javascript error : "Uncaught TypeError: Cannot call method 'apply' of undefined".
There is my object :
Ext.define('PFS.view.Window_Graph', {
extend: 'Ext.Window',
alias: 'widget.window_graph',
layout: 'fit',
border: false,
closable: true,
header: true,
draggable: true,
resizable: true,
border: false,
tbar: [
{ xtype: 'button', action: 'modifier', text: 'Modifier', iconCls: 'iconAppEdit' },
{ xtype: 'button', action: 'deplacer', text: 'Déplacer', iconCls: 'iconArrowOut' },
{ xtype: 'button', action: 'redimensionner', text: 'Redimensionner', iconCls: 'iconShapeHandles'},
{ xtype: 'button', action: 'supprimer', text: 'Supprimer', iconCls: 'iconCross' },
],
autoShow: true,
constrain: true
});
There is when I create my window_graph :
Ext.getCmp('page1').add({
xtype: 'window_graph',
id: 'graph_1',
width: 500,
height: 300,
x: 10,
y: 10
});
And next, I try to hide it like that :
Ext.getCmp('graph_1').hide();
Thanks.
Ext.onReady(function () { Ext.define('PFS.view.Window_Graph', { extend: 'Ext.Window', alias: 'widget.window_graph', layout: 'fit', border: false, closable: true, header: true, draggable: true, resizable: true, border: false, tbar: [{xtype: 'button',text: 'Modifier'}], autoShow: true, constrain: true }); Ext.create('Ext.panel.Panel', { id: 'myPanel', title: 'Test Panel', renderTo: Ext.getBody() }); Ext.getCmp('myPanel').add({xtype: 'window_graph', id:'myWin'}); Ext.getCmp('myWin').hide() });- kevhender