Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Dec 2012
    Posts
    44
    Vote Rating
    3
    Belkin is on a distinguished road

      0  

    Default Build project doesnot work

    Build project doesnot work


    I build my project using sencha app build production

    i have one file with constants which is loaded after sencha touch and before app.js
    Code:
    TheBestOfPets = {};TheBestOfPets.constants = {};
    TheBestOfPets.constants.BaseUrl = "http://vovikdrg.dlinkddns.com:8080/";
    TheBestOfPets.constants.StatusCodes = {
        UserDoesntExists: 1,
        InvalidDeviceKey: 2,
        InvalidSessionId: 3,
        SUCCESS: 200
    };

    but when i try to run project it throw exception that it cant load

    [COLOR=red !important]Failed to load resource: the server responded with a status of 404 (Not Found) http://vovikdrg.dlinkddns.com:8080/d...=1357665475860[/COLOR]
    [COLOR=red !important]Failed to load resource: the server responded with a status of 404 (Not Found) http://vovikdrg.dlinkddns.com:8080/T...=1357665475861



    [/COLOR]



  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,408
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Use a utility singelton class instead...

    Code:
    Ext.define('MyApp.Config', {
        singleton : true,
    
        config : {
            baseUrl : 'http://vovikdrg.dlinkddns.com:8080/'
        },
    
        constructor : function(config) {
            this.initConfig(config);
            this.callParent([config]);
        }
    });
    Save this to app/Config.js and require in app.js using Ext.require('MyApp.Config') making sure there is a path set for MyApp to app (or wherever)

    And then throughout your code you can use:

    Code:
    MyApp.Config.getBaseUrl()
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2012
    Posts
    44
    Vote Rating
    3
    Belkin is on a distinguished road

      0  

    Default


    thanks but any way why it try load model which should and it is built in? i mean it is minimized in app.js

  4. #4
    Sencha User
    Join Date
    Dec 2012
    Posts
    44
    Vote Rating
    3
    Belkin is on a distinguished road

      0  

    Default


    So i am not sure if its bug but any way, after reading documentation and playing i got new solution
    this code works
    Code:
    Ext.define('TheBestOfPets.model.SessionInfo', {    extend: 'Ext.data.Model',
    
    
        config: {
            identifier: {
                type: 'simple',
                prefix: 'ID_'
            },
            fields: [
                { name: 'Key'},
                { name: 'Value' }
            ],
            proxy: {
                type: 'localstorage'
            }
        }
    });
    uuid doesnot work...
    Code:
    Ext.define('TheBestOfPets.model.SessionInfo', {    extend: 'Ext.data.Model',
    
    
        config: {
            identifier: {
                type: 'uuid'
            },
            fields: [
                { name: 'Key'},
                { name: 'Value' }
            ],
            proxy: {
                type: 'localstorage'
            }
        }
    });

Thread Participants: 1