Threaded View

  1. #1
    Sencha - Support Team keckeroo's Avatar
    Join Date
    Mar 2008
    Location
    Winnipeg, Canada
    Posts
    298
    Answers
    4
    Vote Rating
    9
    keckeroo will become famous soon enough

      0  

    Default Answered: Proper inclusion of DateExtras ?

    Answered: Proper inclusion of DateExtras ?


    Arrggh - ran into another gotcha with lack of documentation ;-)

    Code:
    Ext.Loader.setConfig({ 
        enabled: true 
    });
    
    Ext.setup({
        requires: 'Ext.DateExtras'
    });
    
    MyApp = new Ext.application({
        name: 'MyApp',
    
        views: [ 'Main' ],
        controllers: [ 'Main', 'Login', 'Profiles', 'Carousel', 'Messages' ],
        models: [ 'Message', 'Photo', 'Profile' ],
    
        launch: function() {
        }
         
    });
    Above code is based on a few example apps that are distributed with Sencha Touch - and I love the simplicity of this way of starting the app. BUT - according to current docs - DateExtras is included by adding the Ext.setup command shown above. I get an error 'Ext.setup has already been called before'.

    Any help would be greatly appreciated .. and updates to docs too !!! ;-)

    Cheers,

    Kev

  2. Hi Mitchell,

    I can always look to you to provide answers - and I'm very thankful for that. I did, however, find my answer through poking around and debugging.

    The proper use is :

    Code:
    Ext.Loader.setConfig({ 
        enabled: true 
    });
    
    MyApp = new Ext.application({
        name: 'MyApp',
    
        requires: [ 'Ext.DateExtras'],
    
        views: [ 'Main' ],
        controllers: [ 'Main', 'Login', 'Profiles', 'Carousel', 'Messages' ],
        models: [ 'Message', 'Photo', 'Profile' ],
    
        launch: function() {
        }
         
    });
    I initially tried this - and well - many things have changed with date functions which is why the code appeared broken but it wasn't. I just had to update all my calls and things worked

    eg - (date).parseDate is now Ext.Date.parse(...)
    (date).format is now Ext.Date.format(...)
    and so on ...

    So much to watch out for when upgrading to new versions ... lol.
    (grabs more tylenol w/ codeine and continues on - thank god codeine is 'over-the-counter' here in Canada ;-).

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