1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
    syedimty is on a distinguished road

      0  

    Default Unanswered: How to use global variable for store URL

    Unanswered: How to use global variable for store URL


    I want to use global variable for my store. I want to know where to declare global variable.
    My store is set to autoLoad true. I tried declaring variable in Ext.launch function , but the store is loaded even before the launch function

    my store
    Code:
    Ext.define("myapp.store.Bstore",{    extend:"Ext.data.Store",
        
        config:{
            
            model:"myapp.model.Bmodel",
             autoLoad:true,
            proxy:{
            type:'ajax',
            url: myapp.baseURL + '/bulletin/',
            reader:{
            type:'json',
            }
            }, }});

    My launch function
    Code:
       launch: function() {
    *****
    		 myapp.baseURL = 'http://10.5.82.27:9191/';
    
    
    		
     ****    
        
        },

  2. #2
    Sencha User jerome76's Avatar
    Join Date
    Apr 2012
    Location
    New Jersey
    Posts
    1,149
    Answers
    132
    Vote Rating
    99
    jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice jerome76 is just really nice

      0  

  3. #3
    Sencha User
    Join Date
    Jul 2012
    Posts
    6
    Vote Rating
    0
    syedimty is on a distinguished road

      0  

    Default


    The solution you gave worked. But when i build the app as package. I get error again.

    Error : Uncaught TypeError: Cannot read property 'base_url' of undefined

  4. #4
    Sencha User
    Join Date
    Nov 2012
    Location
    Saudi Arabia
    Posts
    3
    Vote Rating
    0
    fabdulqader is on a distinguished road

      0  

    Default


    Quote Originally Posted by syedimty View Post
    The solution you gave worked. But when i build the app as package. I get error again.

    Error : Uncaught TypeError: Cannot read property 'base_url' of undefined
    try to use myapp.app.baseURL it will work

Thread Participants: 2

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