1. #1
    Ext JS Premium Member
    Join Date
    Jun 2010
    Location
    Ireland
    Posts
    43
    Vote Rating
    0
    ospillane is on a distinguished road

      0  

    Default Is it possible to use Sencha SDK and Sandbox mode

    Is it possible to use Sencha SDK and Sandbox mode


    Hi,
    I want to use Sencha SDK to deploy my app but I need to use the Sandbox version of ExtJS4. I keep getting an error saying that 'Ext is not defined'. The app and the build worked perfect when I was including ext-debug.js, but when I switch to any of the sandbox files, I just get the error on the build.
    Does anyone know if this should be possible or not?
    Thanks,
    Orla

  2. #2
    Sencha User
    Join Date
    Jul 2009
    Posts
    14
    Vote Rating
    0
    tinabucur is on a distinguished road

      0  

    Default


    Did anybody tried to modify existing ext-debug.js file in order to work in sandbox mode?

  3. #3
    Ext JS Premium Member
    Join Date
    Jun 2010
    Location
    Ireland
    Posts
    43
    Vote Rating
    0
    ospillane is on a distinguished road

      0  

    Default


    I have not tried to modify this. JSBuilder definitely does not support Sandbox mode at present, I'm hoping Sencha will provide this is a future release.

  4. #4
    Sencha User
    Join Date
    Jul 2009
    Posts
    14
    Vote Rating
    0
    tinabucur is on a distinguished road

      0  

    Default


    Hi ,

    I managed to use ext-debug.js in sandbox mode. All you need to do is to add around the existing source code with the following :
    Code:
    (function(Ext){
    if (typeof Ext === 'undefined') {
    this.Ext = {};
    }
    
    Ext.buildSettings = {"baseCSSPrefix":"x4-","scopeResetCSS":true};
    Ext.isSandboxed = true;
    
    //ext-debug.js content 
    
    })(this.Ext4 || (this.Ext4 = {}));
    Hope this helps
    Cristina

  5. #5
    Sencha User
    Join Date
    Mar 2012
    Posts
    8
    Vote Rating
    0
    BrunoSales is on a distinguished road

      0  

    Default the problem persists?

    the problem persists?


    Hi,

    I wonder if this problem persists in version 2.0.0-beta3.


    I am awaiting.

    Thanks,

  6. #6
    Sencha User
    Join Date
    Nov 2013
    Posts
    2
    Vote Rating
    2
    wajb is on a distinguished road

      2  

    Default


    After almost an entire day of trying to achieve it manually I discovered there is a sandbox build command in Sencha Cmd v4.0.1.45!

    There are loads of ways you could set this but adding the following line to ${app.dir}/.sencha/app/sencha.cfg is pretty simple:
    Code:
    build.concat.options=-sandbox=Ext4:x4-
    (These options are used with the compile "concatenate" command.)

    It's a shame Sencha failed to document this option; although I appreciate sandboxing isn't recommended for release for transitional reasons we're doing it anyway.
    Last edited by wajb; 29 Nov 2013 at 8:46 AM. Reason: Removed statement saying CSS is sandboxed

  7. #7
    Ext JS Premium Member
    Join Date
    Jul 2011
    Posts
    46
    Vote Rating
    4
    adrianmirjan is on a distinguished road

      1  

    Default


    Thank you! This works for me.

  8. #8
    Sencha Premium Member
    Join Date
    Jan 2013
    Posts
    42
    Vote Rating
    4
    mbingham is on a distinguished road

      0  

    Default


    Thanks wajb, very fruitful indeed!

    Code:
    build.concat.options=-sandbox=Ext4:x4-
    So Ext4 becomes the name of the Ext global object.

    And x4 becomes Ext.buildSettings.baseCSSPrefix

    Then I set $prefix: 'x4' in sass/var/all.scss. Perfect.