これは、ここでの私の前の質問から導き出されます。
私はExtJs3.xで約1年間開発しており、ExtJs4に移行したいと思っています。
私は次のようにextJsファイルをコーディングすることに慣れています。
ReportsPanel = function(config){
config = config || {};
function dummyFunction(){
//I would usually have methods in this file also.
}
Ext.apply(config, {
title: 'Reports',
layout: 'border',
id: 'reportsPanel',
closable: 'true',
items: []
});
ReportsPanel.superclass.constructor.call(this, config);
};
Ext.extend(ReportsPanel, Ext.Panel, {
dummy: dummyFunction//Make the dummy function available to call
});
そして、必要に応じてこれをインスタンス化しますnew ReportsPanel()
。
私はExtJs4コードのさまざまな例を見てきましたが、正直言って少し混乱しています。
私はその方法を使うべきだと知っていExt.define
ます。頭が回らないようです。
ExtJs4に変換された上記の例はどのようになりますか?