1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    30
    Vote Rating
    0
    chitgoks is on a distinguished road

      0  

    Default Unanswered: how to access custom class

    Unanswered: how to access custom class


    hi, new to sencha here. i have some predefined javascript functions e.g.

    test.js
    function getString() {
    alert('sample');
    }

    placed it under model/myfolder/test.js

    and within a view javascript file, i want to call and get the value of getString() in test.js

    i tried to use ext.requires , it does not work

    i tried to instantiate it like
    var t = Ext.create('MyProj.model.myfolder.test');

    but it looks like it does not work still

    is this even possible?

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    You should include your script file by using <SCRIPT> tag embedded in HTML file.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    30
    Vote Rating
    0
    chitgoks is on a distinguished road

      0  

    Default


    ive read that putting it within the index.html is not advisable.

    however, i managed to find a solution. place it in the app.json
    Code:
    "js": [
    	{
                "path": "myfolder/myjs.js"
            },
    ],
    though i am wondering. if the myfolder has many .js files and iw ant to import all of them, does that mean i have to add an entry of "path": "myfolder/myjs1.js" 1 by 1?

  4. #4
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    It seems that this is your own solution. I don't know how it work so it's hard to give out a suggestion.

  5. #5
    Sencha User
    Join Date
    Sep 2012
    Posts
    30
    Vote Rating
    0
    chitgoks is on a distinguished road

      0  

    Default


    actually this is not my solution, but one that was discussed in the docs. thank you for replying though

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,911
    Answers
    655
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

Thread Participants: 2

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