PDA

View Full Version : I want to define more than one class in one file.



Antronak
22 Jul 2011, 1:02 AM
Hi,

I want to define two classes in one file. The second class extends first class.


Ext.define('app.ToolOptionPanel', {
extend: 'Ext.panel.Panel',
...
});

Ext.define('app.ToolNumberOptionPanel', {
alias: 'widget.toolnumberoptionpanel',
extend: 'app.ToolOptionPanel',
...
});


I don't put any JS files in my HTML header, except "ext.js" and my "app.js". Every other files are loaded dynamic.
And after define first class, app.ToolOptionPanel is undefined and second define throws exception.
When I use ext-all instead, it works, but I need ext.js to make build.
Is it bug, or I have to separate those classes into two files?

Thanks in advance!