PDA

View Full Version : MVC Application Compile Problem



Cake4k
6 Feb 2014, 8:51 AM
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

scottmartin
6 Feb 2014, 9:30 AM
exclude -namespace Ext

Removing all of Ext?

What if you just do:

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?

Cake4k
6 Feb 2014, 9:47 AM
The goal was to compile the app... so only one file gets loaded
"sencha app build" is the normal way?

scottmartin
6 Feb 2014, 9:59 AM
"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.

Cake4k
6 Feb 2014, 10:07 AM
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/showthread.php?263724-BUG-or-just-my-bad-coding

Cake4k
6 Feb 2014, 10:14 AM
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

scottmartin
6 Feb 2014, 10:30 AM
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


"build.concat.options=--remove-text-references=false"


Scott.