1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Toronto
    Posts
    105
    Vote Rating
    2
    basememara is on a distinguished road

      0  

    Default Answered: How to create application functions for app-wide use?

    Answered: How to create application functions for app-wide use?


    I would like to create application wide functions so my controllers and views can use them. However, it is saying that my functions are undefined when I try to use them from other classes. This is what I am trying to do:

    Code:
    Ext.application({
        name: 'MyApp',
        someFunction: function(data) {
            alert(data.something);
        }
    });
    Then in my controller I try to do this: MyApp.someFunction(data), but it gives me this error:
    Uncaught TypeError: Cannot read property 'fn' of undefined

    What am I doing wrong?

  2. Instead of MyApp.SomeFunction() in controller use this.application.SomeFunction()

  3. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    49
    Answers
    1
    Vote Rating
    0
    Digital God is on a distinguished road

      0  

    Default


    Instead of MyApp.SomeFunction() in controller use this.application.SomeFunction()

Thread Participants: 1

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