Hybrid View
-
16 Feb 2011 2:47 PM #1
using "new" or Ext.createWidget
using "new" or Ext.createWidget
Hi,
In the examples, the Ext.creatdWidget method is used instead of the "new" keyword. Is this the way to go forward?
I understand that ClassManager->instantiateByAlias internally will load the required classes and signal for ready. But, is Ext.creatdWidget also appropriate for production environments? Especially when ext-all.js will be included in the page?
Regards,
Gevik
-
16 Feb 2011 10:35 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Jul 2009
- Location
- Palo Alto, California
- Posts
- 469
- Vote Rating
- 9
There are many benefits of using Ext.widget() (Ext.createWidget() will be deprecated in the next release) that we will be revealing through in-depth tutorials in the coming weeks. Beside the convenience of instantiating by xtype (no need to remember the full class name), it enables dynamic dependency resolution behind-the-scene to ensure the corresponding class is loaded the first time it's instantiated.
Again we decided to delay introduction of Ext.Loader until the next release, so that we have more time to prepare good documentation. Stay tuned
Sencha Touch Lead Architect
-
17 Feb 2011 3:24 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 4
To answer your question in short, yes, it would be better to use Ext.widget instead of new Widget going forward. There will be more benefits in the long term then just enabling dynamic loading.
Similar Threads
-
"passing google maps gevents to extjs" or "simulate mouse click"
By thomas.oberthanner in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 11 Aug 2011, 6:06 AM -
[CLOSED][3.0] SetValue shows "valueField" instead of "displayField". mode "local".
By galdaka in forum Ext 3.x: BugsReplies: 3Last Post: 28 Oct 2009, 6:38 AM -
[2.2] "hideCollapseTool: true" still shows "expand" tool if Panel starts collapsed
By thesilentman in forum Ext 2.x: BugsReplies: 8Last Post: 11 Sep 2008, 9:00 AM -
replace the "south" with the "new Ext.StatusBar" in "layout:'border'"
By ealpha in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 18 May 2008, 8:28 PM


Reply With Quote
