1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    Joz Michael is on a distinguished road

      0  

    Default Difference between Ext.setup(), Ext.application() and Ext.regApplication()

    Difference between Ext.setup(), Ext.application() and Ext.regApplication()


    I am a newbie for Sencha touch 2.0 and just footed in this.

    Could Some one Explain the difference between Ext.setup(), Ext.application() and Ext.regApplication().

    In few Examples i am seeing Ext.application(), and in few Ext.regApplication(). When Googling on these i found something new, Ext.setup().

    Could Some one explain difference between them and scenarios to use respective function...

    Thanks in advance.

  2. #2
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    14
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      1  

    Default


    Ext.regApplication() is deprecated in favor of Ext.application()

    Ext.setup() is the entry-point to initialize the application, including but not limited to the viewport, the event system, animation runner, logger, etc.

    Ext.application() calls Ext.setup() behind-the-scene and pass whatever config you give to Ext.setup(). The only thing extra Ext.application() does is to require and create an instance of Ext.app.Application to initialize the MVC structure. The reason why some examples use Ext.setup() instead of Ext.application() is because they are tiny code snippets to demo a certain view, and doesn't need MVC at all.

    Bottom line: for your applications, always use Ext.application()
    Sencha Touch Lead Architect

  3. #3
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    Joz Michael is on a distinguished road

      0  

    Default


    Hi Jacky,

    Thanks for your response...

    I used Sencha touch 2.0 and tried a small code snippet.

    Ext.application({
    launch: function(){
    var myPanel = Ext.create("Ext.Panel",{
    html: "HELLO"
    });
    Ext.Viewport.add(myPanel);
    }
    });

    This Works Fine... Displays Text in Browser(Google Chrome 18.0)... But,

    Ext.regApplication({
    launch: function(){
    var myPanel = Ext.create("Ext.Panel",{
    html: "HELLO"
    });
    Ext.Viewport.add(myPanel);
    }
    });

    (or)


    Ext.setup({
    launch: function(){
    var myPanel = Ext.create("Ext.Panel",{
    html: "HELLO"
    });
    Ext.Viewport.add(myPanel);
    }
    });

    NOT WORKING......!!! :-(

    Displays Nothing in Browser(Google Chrome 18.0).

    Thanks in advance... :-)




  4. #4
    Sencha User Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    14
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      0  

    Default


    As I said Ext.regApplication() is deprecated, don't use it anymore.

    Ext.setup() invokes the given 'onReady' property, not 'launch'. 'launch' is Ext.app.Application specific.

    Code:
    Ext.setup({
        onReady: function(){
            // ...
        }
    })
    Sencha Touch Lead Architect

  5. #5
    Sencha User
    Join Date
    Apr 2012
    Posts
    6
    Vote Rating
    0
    Joz Michael is on a distinguished road

      0  

    Default


    Thanks Jacky....

    That helped so much for a Clear Start for App development... :-)

    Now i am quite comfortable to build a layout... I need to Change the styles, (ie) color, icons, gradients, background image. Can u plz help me on this...

  6. #6
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Vote Rating
    0
    wvillegasm@me.com is on a distinguished road

      0  

    Default


    Jacky Nguyen, I really appreciate your explanations, you help me too!

  7. #7
    Sencha User
    Join Date
    Apr 2013
    Posts
    1
    Vote Rating
    0
    waranwin is on a distinguished road

      0  

    Default


    Quote Originally Posted by Joz Michael View Post
    Hi Jacky,

    Thanks for your response...

    I used Sencha touch 2.0 and tried a small code snippet.

    Ext.application({
    launch: function(){
    var myPanel = Ext.create("Ext.Panel",{
    html: "HELLO"
    });
    Ext.Viewport.add(myPanel);
    }
    });

    This Works Fine... Displays Text in Browser(Google Chrome 18.0)... But,

    Ext.regApplication({
    launch: function(){
    var myPanel = Ext.create("Ext.Panel",{
    html: "HELLO"
    });
    Ext.Viewport.add(myPanel);
    }
    });

    (or)


    Ext.setup({
    launch: function(){
    var myPanel = Ext.create("Ext.Panel",{
    html: "HELLO"
    });
    Ext.Viewport.add(myPanel);
    }
    });

    NOT WORKING......!!! :-(

    Displays Nothing in Browser(Google Chrome 18.0).

    Thanks in advance... :-)



    But In my case regApplication is working and Ext.application is not working... And I m unable to create sample panel..hye please any one help me

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi