0

I've been trying to setup using Sencha Cmd for our ExtJS 4.2.2 project, and the build completes successfully, but when I try to run the app I get this:

TypeError: comp is null

I'm running the testing build, so the app.js is concatenated but not minified.

Same thing happens if I run the production build.

If I execute from my raw source code files, the app runs fine.

Its happening in this code in the generated app.js:

/**
* Creates new LoadMask.
* @param {Object} [config] The config object.
*/
constructor : function(config) {
var me = this,
comp;
if (arguments.length === 2) {
if (Ext.isDefined(Ext.global.console)) {
Ext.global.console.warn('Ext.LoadMask: LoadMask now uses a standard 1 arg constructor: use the target config');
}
comp = config;
config = arguments[1];
} else {
comp = config.target;
}
// Element support to be deprecated
if (!comp.isComponent) {
if (Ext.isDefined(Ext.global.console)) {
Ext.global.console.warn('Ext.LoadMask: LoadMask for elements has been deprecated, use Ext.dom.Element.mask & Ext.dom.Element.unmask');
}
comp = Ext.get(comp);
this.isElement = true;
}
me.ownerCt = comp;
if (!this.isElement) {
me.bindComponent(comp);
}
me.callParent([config]);
if (me.store) {
me.bindStore(me.store, true);
}
}, 
Greg Lafrance
  • 809
  • 15
  • 35
  • It's hard to tell with how comp is being reassigned in your current code snippet. Can you just try commenting out any reference to comp line by line and narrow it down a bit? We've found that when it comes to dealing with Sencha CMD problems (especially build process) the best approach is to methodically simplify your code bit by bit, eventually you'll hit a breakthrough. – OhmzTech Feb 15 '14 at 03:56
  • Yeah, but its a bummer because my boss is breathing down my neck that implementing changes is taking way too long and I'm just hoping I get it to work. – Greg Lafrance Feb 15 '14 at 06:12
  • So my manager has become frustrated with my attempts to get Sencha Cmd to work. I get close, meaning I can successfully do sencha app build, and the code is minified, but when I try to use the generated minified file I get run-time errors, like there are unresolved dependencies. – Greg Lafrance Feb 19 '14 at 02:56
  • There must be something you are missing. The best approach really is process of elimination. Contact us directly with some source and we can probably help work it out. – OhmzTech Feb 22 '14 at 02:31

0 Answers0