Saturday, 15 March 2014

What is the point of config property on components in ExtJS/Sencha Touch? -



What is the point of config property on components in ExtJS/Sencha Touch? -

consider code , notice config property.

ext.define('touchtomatoes.view.welcomeoverlay', { extend: 'ext.panel', xtype: "main", config: { cls: "welcomeoverlay", html: [ "<div class='message'>", "<h2>welcome <em>touch tomatoes</em></h2>", "<p>browse of our lists selecting tab @ bottom, or swiping across app. <br/>you can find film in our search section.</p>", "<div class='tap'>tap anywhere begin</div>", "</div>" ].join(""), hidden:true }, initialize: function() { this.element.on({ tap: { fn: function() { this.hide(); }, single:true, scope:this } }) } });

until place config items straight class definition, , work. thinking way (since config property not documented in api example). can tell how 1 way different another?

the same thing goes initialize method there, utilize initcomponent this, why many alternative names , ways in extjs?

the config alternative should used create own getters , setters custom properties. let's added property there like: type: 'userform'. after panel creation process, have gettype , settype methods available panel.

extjs sencha-touch

No comments:

Post a Comment