Page 4 of 4 FirstFirst ... 234
Results 31 to 35 of 35

Thread: Ext.create vs the keyword new

  1. #31
    Sencha User pmachner's Avatar
    Join Date
    Jun 2011
    Location
    Krakw, Poland
    Posts
    54

    Default

    Thanks again Jacky. I appreciate, especially when I think what time it is in California right now ;-)

  2. #32
    Sencha User
    Join Date
    Feb 2008
    Location
    Pune, India
    Posts
    5

    Lightbulb Ext.create is for framework users

    Ext.create() is for framework users, if your object lifecycle has to controlled by framework then one should not hesitate in using it. I don't see any reason if you want to use it for non-framework objects. Lot many lessons to take from Java Spring framework on this matter.

    There are many future benefits of using it though I would consider writing wrapper functionality for Ext.create method usage. Since Extjs is changing framework with every release, make some arrangements for future change. This should help you in upgrading to the next release.

  3. #33
    Ext JS Premium Member yyjia's Avatar
    Join Date
    Oct 2008
    Location
    Greater Boston Area
    Posts
    89

    Default

    Hi sshinde,

    will you share with us what has been among different version of Ext JS 4 and it cause the usage of Ext.create has problem? Thank you.
    Thanks and regards,

    Yiyu Jia

  4. #34

    Default

    Hi
    So did you finish your project using 'new' or 'create'? Can you post your findings one vs the other?
    Thanks

  5. #35
    Sencha User
    Join Date
    May 2011
    Location
    Wellington
    Posts
    7

    Default

    Do I need to manually cache instantiation of a widget or is this handled for me automatically by Ext.ClassManager?

    e.g. should I do:

    Code:
    		// only instantiate once
    		this.indexView = this.indexView || Ext.create('ACME.view.Index', {
    			id: 'myIndex'
    		});
    or is this sufficient:
    Code:
    		// caching handled automatically by Class Manager 
    		this.indexView = Ext.create('ACME.view.Index', {
    			id: 'myIndex'
    		});

Page 4 of 4 FirstFirst ... 234

Similar Threads

  1. Highlight keyword in drop down list
    By SimoAmi in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 9 Dec 2009, 11:20 AM
  2. keyword this not work
    By igi in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 23 Jun 2009, 5:16 AM
  3. Search based on Keyword
    By DevHasten in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 8 May 2008, 10:16 PM
  4. [Solved]Binding a fuction's this keyword?
    By vendiddy in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 14 Dec 2007, 5:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •