Results 1 to 5 of 5

Thread: Wrong namespace when adding classes

  1. #1
    Sencha Premium Member Fredric Berling's Avatar
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    209
    Answers
    4
    Vote Rating
    21
      0  

    Default Answered: Wrong namespace when adding classes

    The plugin ignores my app name when creating classes. This has worked before. My appName is "Risk"

    I get

    "app.view.UI"

    when i should get

    "Risk.view.UI"

    Also when i create classes in for exampe "overrides" folder (above app folder) it suggests

    "Root.overrides.DateField"

    Im running :
    Plugin 6.0.11.531
    Webstorm 6.1
    Windows 7 , 64 bit

  2. It looks like the following comment in app.json is preventing it from being parsed correctly:

    // set to "full" to make app.js end up in localStorage. IF cache{enable:true} on row 304.

    This can be fixed by removing the quotes and curly braces, so:

    // set to full to make app.js end up in localStorage. IF cache enable:true on row 304.

    It must be a bug in the library we're using to parse commented json. I will look into it further but in the meantime this is the workaround.

  3. #2
    Sencha User Mark.Brocato's Avatar
    Join Date
    Mar 2015
    Location
    Maryland
    Posts
    482
    Answers
    114
    Vote Rating
    53
      0  

    Default

    Sounds like it's having trouble finding your app.json. Can you post the contents of your app.json and a screenshot of the project structure?

  4. #3
    Sencha Premium Member Fredric Berling's Avatar
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    209
    Answers
    4
    Vote Rating
    21
      0  

    Default

    Here is my app.json and structure riskstruct.png
    {
    "name": "Risk",
    "version": "1.0.0.0",
    "indexHtmlPath": "index.html",
    "classpath": [
    "app"
    ],
    "overrides": [
    "overrides"
    ],
    "framework": "ext",
    "toolkit": "classic",
    "theme": "dbr-core-ui-theme-neptune",
    "requires": [
    "font-awesome",
    "ux",
    "font-pictos",
    "dbr-core-ui@0.9.22",
    "dbr-core-ui-theme-neptune@0.9.22"
    ],
    "fashion": {
    "inliner": {
    "enable": false
    }
    },
    "sass": {
    "namespace": "Risk",
    "etc": [
    "sass/etc/all.scss"
    ],
    "var": [
    "sass/var/all.scss",
    "sass/var"
    ],
    "src": [
    "sass/src"
    ]
    },
    "js": [
    {
    "path": "app.js",
    "bundle": true,
    "update":"" // set to "full" to make app.js end up in localStorage. IF cache{enable:true} on row 304.
    }
    ],
    "css": [
    {
    "path": "${build.out.css.path}",
    "bundle": true,
    "exclude": ["fashion"]
    }
    ],
    "loader": {
    "cache": false,
    "cacheParam": "_dc"
    },
    "production": {
    "output": {
    "appCache": {
    "enable": true,
    "path": "cache.appcache"
    }
    },
    "loader": {
    "cache": "${build.timestamp}"
    },
    "cache": {
    "enable": false //True uses localStorage for both app.js and app.json. app.js must be specifed with update:'full'
    },
    "compressor": {
    "type": "yui"
    }
    },
    "testing": {
    },
    "development": {
    "tags": [
    ]
    },
    "bootstrap": {
    "base": "${app.dir}",

    "microloader": "bootstrap.js",
    "css": "bootstrap.css"
    },
    "output": {
    "base": "${workspace.build.dir}/${build.environment}/${app.name}",
    "appCache": {
    "enable": false
    }
    },
    "cache": {
    "enable": false,
    "deltas": true
    },
    "appCache": {
    /**
    * List of items in the CACHE MANIFEST section
    */
    "cache": [
    "index.html",
    "resources/images/tab-bar/smaller-plain-scroll-left.png",
    "resources/images/tab-bar/smaller-plain-scroll-right.png",
    "resources/images/tab-bar/default-plain-scroll-left.png",
    "resources/images/tab-bar/default-plain-scroll-right.png",
    "resources/images/loadmask/loading.gif",
    "resources/images/form/checkbox.png",
    "resources/images/form/date-trigger.png",
    "resources/images/DBR-logo-with-text.svg"
    ],
    "network": [
    "*"
    ],
    "fallback": []
    },
    "resources": [
    {
    "path": "resources",
    "output": "shared"
    }
    ],
    "ignore": [
    "(^|/)CVS(/?$|/.*?$)"
    ],
    "archivePath": "archive",
    "id": "49b91450-fd04-4fee-b9fe-6d3fe929a70d"
    }

  5. #4
    Sencha User Mark.Brocato's Avatar
    Join Date
    Mar 2015
    Location
    Maryland
    Posts
    482
    Answers
    114
    Vote Rating
    53
      0  

    Default

    It looks like the following comment in app.json is preventing it from being parsed correctly:

    // set to "full" to make app.js end up in localStorage. IF cache{enable:true} on row 304.

    This can be fixed by removing the quotes and curly braces, so:

    // set to full to make app.js end up in localStorage. IF cache enable:true on row 304.

    It must be a bug in the library we're using to parse commented json. I will look into it further but in the meantime this is the workaround.

  6. #5
    Sencha Premium Member Fredric Berling's Avatar
    Join Date
    Sep 2007
    Location
    Sweden
    Posts
    209
    Answers
    4
    Vote Rating
    21
      0  

    Default

    Thanks for fast debugging and response Mark. I'm a happy dev now

Similar Threads

  1. SCSS for classes with custom namespace
    By ludoo in forum Sencha Cmd
    Replies: 2
    Last Post: 24 Oct 2013, 12:26 AM
  2. Replies: 0
    Last Post: 18 May 2011, 12:09 PM
  3. what namespace(s) for classes to be reused in multiple apps?
    By extjs.ben in forum Ext: Discussion
    Replies: 3
    Last Post: 9 May 2011, 1:04 AM
  4. Defining classes in a totally independent namespace
    By Greendrake in forum Ext: Discussion
    Replies: 0
    Last Post: 31 Mar 2011, 12:43 AM
  5. namespace, classes & viewport
    By dgubber in forum Ext 2.x: Help & Discussion
    Replies: 8
    Last Post: 18 Jan 2009, 5:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •