Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Aug 2010
    Posts
    25
    Vote Rating
    1
    Frank345 is on a distinguished road

      0  

    Default Beta2: this.application is undefined in Ext.app.Controller.launch()

    Beta2: this.application is undefined in Ext.app.Controller.launch()


    Hi,

    I am accessing this.application within the controller's launch() function.
    This worked with pr3 and earlier releases.
    Isn't this.application supposed to be available within all controller functions?
    But it seams to be undefined within launch(). This is my code...

    Code:
    Ext.define('app.controller.MyController', {
        extend: 'Ext.app.Controller',
    
        launch: function() { // called after the launch method of Application is executed.
            this.application.on({...}); // --> Uncaught TypeError: Cannot call method 'on' of undefined
           // ...
        },
    });
    Best regards,
    Frank

  2. #2
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    Use this.getApplication()

    As a general rule, all properties in your Sencha Touch 2 code should go through a getter function like getApplication
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  3. #3
    Sencha User
    Join Date
    Aug 2010
    Posts
    25
    Vote Rating
    1
    Frank345 is on a distinguished road

      0  

    Default


    this.getApplication() does the job.
    Thank you very much,
    Frank

Thread Participants: 1

Tags for this Thread

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