I'm wondering how can i retrieve parameters i've pass on with Ext.create, how can i retrieve them in the object constructor code ?
Example :
// class definition
Ext.define('MyClass', {
extend : 'Ext.panel.Panel',
width : 500,
height : 300,
constructor : function(??? config or what else ???) {
// now i wanna check a parameter named isExpertMode1 and isExpertMode2
this.isExpertMode = (arguments.isExpertMode1 > 0 ? 2:arguments.isExpertMode2) ; // doesn't work
this.callParent([arguments]) ;
}
}
// now creating an instance with the parameters
var myinstance = Ext.create('MyClass', {
isExpertMode1 : 3,
isExpertMode2 : 5
}) ;
Do you guys see the picture ? How can i proceed to retrieve isExpertMode1 and isExpertMode2 in MyClass constructor ?