Hello. Please help me deal with the following situation:
Ext Designer ( ExtJs visual design ExtJs ) outputs two files with a finished program. The first one looks like this (EditingTemplateWindow.js):
EditingTemplateWindow = Ext.extend(EditingTemplateWindowUi, { initComponent: function() { EditingTemplateWindow.superclass.initComponent.call(this); } }); In the second, the implementation of everything directly:
EditingTemplateWindowUi = Ext.extend(Ext.Window, { // Реализация всего .... // ... .... .... .... }); Further, it all starts fine from the following code:
Ext.onReady(function() { Ext.QuickTips.init(); var cmp1 = new EditingTemplateWindow({ renderTo: Ext.getBody() }); cmp1.show(); }); And the problem is this. I'm in my program, following the pattern trying to open my this window. I do this:
//Глобальная переменная var editingTemplateWindow; // Логика программы на ExtJs... ... ... //Что-то произошло, и надо вывести пользователю мое окно: editingTemplateWindow = new EditingTemplateWindow(); Here the console gives an error: EditingTemplateWindow is not a constructor .
Question: how can I make the program work? And what Ext.extend function Ext.extend ?
console.log(Ext.extend(...));. - ling