How can I do it? If I add an item to a viewport with :
Ext.define('Me.view.Viewport', {
extend: 'Ext.container.Viewport',
layout: 'fit',
requires: [
'Me.view.Params',
'Me.view.DrawChart',
'Me.view.ParamsBtn'
'Me.view.ChartWin'
],
initComponent: function() {
this.items = {
items : [{ xtype : params, align : center},{xtype : paramsbtn, align...}]};
Well, if I add my views in "requires" I need to instantiate them somewhere in my viewport, or else it gives me this error :
Uncaught TypeError: Cannot read property 'isInstance' of undefined
Per example I have a window that I need to show after a button click, but my app cannot recognize it unless it's in the viewport, but I don't want it to be in the viewport, I just want to show it... I've asked this question : adding item to window Extjs 4 where you can see the code of my ChartWin where i added an item which is the view DrawChart. Now i just need to show that ChartWin after a button click.
Please any help would be much much much appreciated.