16 Feb 2011 2:47 PM #1
using "new" or Ext.createWidget
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?
16 Feb 2011 10:35 PM #2
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 tunedSencha Touch Lead Architect
17 Feb 2011 3:24 AM #3
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.
By thomas.oberthanner in forum Ext 3.x: Help & DiscussionReplies: 2Last Post: 11 Aug 2011, 6:06 AM
By galdaka in forum Ext 3.x: BugsReplies: 3Last Post: 28 Oct 2009, 6:38 AM
By thesilentman in forum Ext 2.x: BugsReplies: 8Last Post: 11 Sep 2008, 9:00 AM
By ealpha in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 18 May 2008, 8:28 PM