1. #1
    Sencha Premium Member
    Join Date
    Sep 2011
    Location
    London
    Posts
    7
    Vote Rating
    0
    stevenarcher is on a distinguished road

      0  

    Default Using Ext.Loader.setConfig to set disableCaching : false

    Using Ext.Loader.setConfig to set disableCaching : false


    Hi,

    I have a couple of questions regarding Ext.Loader.setConfig():

    1) I want to debug some code prior to my application displaying its initial view, and so I want to set disableCaching : false in Ext.Loader.setConfig() so my breakpoints persist after a refresh and I can stop at the required point.

    I have a hand-crafted Sencha Touch 2 application I'm using as a reference, which simply contains this code:

    Code:
    Ext.Loader.setConfig({
        enabled : true,
        disableCaching : true,
        <....some other statements...>
    });
    I can't see in Sencha Designer how to do this?

    2) This property disableCaching : false seems to be logically back to front, as boolean properties are normally named according to a positive statement (enable rather than disable) e.g. enableCaching: true rather than disableCaching: false?

    Cheers,
    Steve

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,085
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    1)
    The ability to set loader configurations is not supported yet.

    If you've already created the majority of the classes for your application, you're best off making a copy of the designer.js and html file and changing that once. Then you only need to worry when the designer.js file changes in the future.

    Sorry, not a pretty solution but a workaround for the time being.

    2)
    disableCaching is the configuration. I understand your logic but this is not the API. It mimics many standard HTML things like inputs etc.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2011
    Location
    Sacramento, CA
    Posts
    56
    Vote Rating
    0
    CasualNetworks is on a distinguished road

      0  

    Default


    We would like to see this feature added as well. The backend server that we have no control over for a project does not support caching parameters.

    We have been using @aconranworkaround #1 above

    Current
    Code:
    Ext.Loader.setConfig({
      enabled: true
    });
    Requested
    Code:
    Ext.Loader.setConfig({
      disableCaching : false,
      enabled: true
    });

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,085
    Vote Rating
    113
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    This was implemented in build #353. Here's how you can do it....

    Go to the Application node.
    Search for Loader in the property configuration search (or enable advanced mode and scroll to it)
    Click the + next to Loader Config
    Go to the new loader node, you can either click the arrow or click it in the inspector
    Turn off disableCaching via the boolean property pane
    Aaron Conran
    @aconran
    Sencha Architect Development Team

Thread Participants: 2