Results 1 to 7 of 7

Thread: MVC Application Compile Problem

  1. #1
    Sencha User
    Join Date
    Feb 2014
    Posts
    11
    Vote Rating
    0
      0  

    Default MVC Application Compile Problem

    Hello,

    today i compiled a extj application.

    i got the following problem:

    all-classes.js:
    ...
    Ext.define('app.Example',{
    extend: Ext.data.TreeStore ,

    ....
    });
    ...

    the compiler removes the Quotes "Ext.tree.Panel" and the application throws errors like:
    ...Cannot read property 'TreeStore'...

    adding the quotes solves the problem for this line... but there are a lot

    command line:
    sencha compile -classpath=ext-4/src/,app/ exclude -namespace Ext and concat -strip all-classes.js

    what i can do?

    sincerly
    Lars

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    505
      0  

    Default

    exclude -namespace Ext
    Removing all of Ext?

    What if you just do:
    Code:
    sencha app build
    What is your goal, to just compile your app, or to extract Ext from all-classes and just have your code in the file?

  3. #3
    Sencha User
    Join Date
    Feb 2014
    Posts
    11
    Vote Rating
    0
      0  

    Default

    The goal was to compile the app... so only one file gets loaded
    "sencha app build" is the normal way?

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    505
      0  

    Default

    "sencha app build" is the normal way?
    Correct.

    That is basically a script that runs 'sencha compile ..' using all of your meta to build your app.

    'sencha compile .. ' is if you want to create custom builds.

  5. #5
    Sencha User
    Join Date
    Feb 2014
    Posts
    11
    Vote Rating
    0
      0  

    Default

    okay but iam curious why the quotes got removed?
    Is there anyway to fix this or set an rgument?

    i found a forum post with the same problem i guess: http://www.sencha.com/forum/showthre...-my-bad-coding

  6. #6
    Sencha User
    Join Date
    Feb 2014
    Posts
    11
    Vote Rating
    0
      0  

    Default

    okay but iam still curious why the quotes got removed? Is there a way to fix this? Set an argument or something?
    Cause later on the should be a custom build

  7. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409
    Answers
    716
    Vote Rating
    505
      0  

    Default

    You should not have received error if you did not excluded Ext from your build, hence the class would have been found.
    The quotes tell Cmd to perform loader lookup. Since these are Ext, they are removed so it can just reference it direct.

    You can bypass this by using the following in your build.properties or production.properties
    Code:
    "build.concat.options=--remove-text-references=false"
    Scott.

Tags for this Thread

Posting Permissions

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