1. #21
    Sencha Premium Member
    Join Date
    Apr 2012
    Location
    Germany
    Posts
    120
    Vote Rating
    3
    clifficious is on a distinguished road

      0  

    Default


    I'll do some investigations too
    If I succeed, I'll post it here.

  2. #22
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    joedeveloper is on a distinguished road

      0  

    Default


    I seem to be having a problem trying to build this application to a production build. Always seems to stall on

    [INFO] Deploying your application to C:\SampleShoppingCart\build\production
    [INFO] Copied sdk/sencha-touch.js
    [INFO] Copied app-all.js
    [INFO] Copied resources/css/app.css
    [INFO] Copied default-theme.css
    [INFO] Copied src/ux/Cart/resources/css/cart.css
    [INFO] Copied resources/images
    [INFO] Copied resources/icons
    [INFO] Copied resources/loading
    [INFO] Resolving your application dependencies..

    Not sure what is causing this. I have compiled the jsb3 and the minified versions. Then I run the sencha app build production with the sdk/microloader/development.js file as the only linked file in there. Before adding in the cart code my application would build, but not it doesn't seem to want to build. Any ideas?

  3. #23
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      1  

    Default


    most likely, you've made a common mistake. Does you filled url value inside app.json?
    It necessary for production build.

  4. #24
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    joedeveloper is on a distinguished road

      0  

    Default


    Currently this is the contest of the app.json file:

    {
    /**
    * The application's namespace, used by Sencha Command to generate classes
    */
    "name": "CCOR",


    /**
    * List of all JavaScript assets in the right execution order.
    * Each item is an object with the following format:
    * {
    * "path": "path/to/script.js" // Relative path to this app.json file
    * "update": "delta" // (Optional)
    * // - If not specified, this file will only be loaded once, and
    * // cached inside localStorage until this value is changed.
    * // - "delta" to enable over-the-air delta update for this file
    * // - "full" means full update will be made when this file changes
    *
    * }
    */
    "js": [
    {
    "path": "sdk/sencha-touch.js"
    },
    {
    "path": "app-all.js"
    }
    ],


    /**
    * List of all CSS assets in the right inclusion order.
    * Each item is an object with the following format:
    * {
    * "path": "path/to/item.css" // Relative path to this app.json file
    * "update": "delta" // (Optional)
    * // - If not specified, this file will only be loaded once, and
    * // cached inside localStorage until this value is changed to either one below
    * // - "delta" to enable over-the-air delta update for this file
    * // - "full" means full update will be made when this file changes
    *
    * }
    */
    "css": [
    {
    "path": "resources/css/app.css"
    },
    {
    "path": "default-theme.css"
    },
    {
    "path": "src/ux/Cart/resources/css/cart.css"
    }
    ],


    /**
    * Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build
    */
    "appCache": {
    /**
    * List of items in the CACHE MANIFEST section
    */
    "cache": [
    "index.html"
    ],
    /**
    * List of items in the NETWORK section
    */
    "network": [
    "*"
    ],
    /**
    * List of items in the FALLBACK section
    */
    "fallback": []
    },


    /**
    * Extra resources to be copied along when build
    */
    "extras": [
    "resources/images",
    "resources/icons",
    "resources/loading"
    ],


    /**
    * Directory path to store all previous production builds. Note that the content generated inside this directory
    * must be kept intact for proper generation of delta between updates
    */
    "archivePath": "archive",


    /**
    * Default paths to build this application to for each environment
    */
    "buildPaths": {
    "testing": "build/testing",
    "production": "build/production",
    "package": "build/package",
    "native": "build/native"
    },


    /**
    * Build options
    */
    "buildOptions": {
    "product": "touch",
    "minVersion": 3,
    "debug": false,
    "logger": "no"
    },


    /**
    * Uniquely generated id for this application, used as prefix for localStorage keys.
    * Normally you should never change this value.
    */
    "id": "1aae6400-8295-11e1-8631-c18ee3ec5940"
    }

  5. #25
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    you should add these blocks to your config:
    Code:
    /**     * The file path to this application's front HTML document, relative to this app.json file
         */
        "indexHtmlPath": "index.html",
    
    
        /**
         * The absolute URL to this application in development environment, i.e: the URL to run this application
         * on your web browser during development, e.g: "http://localhost/myapp/index.html".
         *
         * This value is needed when build to resolve your application's dependencies if it requires server-side resources
         * that are not accessible via file system protocol.
         */
        "url": "http://localhost/projects/apps/mindsaur/index.html",
    it seems strange what your config file have not contain these lines. It is defaults created by sencha command

  6. #26
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    joedeveloper is on a distinguished road

      0  

    Default


    Yeah it was kind of strange. I blew the entire thing out and created a new application from sencha create app command. This seemed to resolve that issue and it's building fine. However when running it I'm getting the following error when it tries to load... Only when I include the cart resources etc.

    Error evaluating http://localhost/SampleShoppingCart/app.js with message: SyntaxError: Unexpected string

  7. #27
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    joedeveloper is on a distinguished road

      0  

    Default


    So the error message changed but now it's unexpected token.

    Come to find out it's because I've added in a $ dollar symbol to be in front of the money in the cart.

    ItemLine.js

    this.priceEl.setHtml('Price: $' +

    I guess that's why you didn't have a Dollar sign in there. Wonder if there is a way to escape that properly inside of sencha, any ideas?

  8. #28
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    175
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    I'm not sure whether correctly I understood you
    we can use html entity $ instead $

  9. #29
    Sencha User
    Join Date
    Mar 2012
    Posts
    5
    Vote Rating
    0
    joedeveloper is on a distinguished road

      0  

    Default


    Quote Originally Posted by kostysh View Post
    I'm not sure whether correctly I understood you
    we can use html entity $ instead $
    I tried with ASCII $#36; ... now ILLEGAL TOKEN, instead of UnexpectedIdentifier.

    I think perhaps it's the method setHtml and setLabel... because in src/ux/Cart/controller/Indicator.js I used the standard escape character and it has no issue.

    // View cart info on badges
    cartBtn.setBadgeText(itemsCount);
    cartBtn.setTotalBadgeText("\$"+Cart.getTotalSum());