View Full Version : Basic question about ext-all-dev.js

23 Apr 2013, 9:02 AM
Hi, I'm trying to get started with sencha cmd but have run into a problem. I've used "sencha app build" to create a build of a simple application containing a few classes.

index.html contains the following code:

<meta charset="UTF-8">
<!-- <x-compile> -->
<!-- <x-bootstrap> -->
<link rel="stylesheet" href="bootstrap.css">
<script src="ext/ext-all-debug.js"></script>
<script src="bootstrap.js"></script>
<!-- </x-bootstrap> -->
<script src="app/app.js"></script>
<!-- </x-compile> -->

When ext-all-debug.js is used (this is in the unbuilt version) the page display correctly in the browser without any errors. However, if I substitute this for ext-all-dev.js I get a couple of fatal errors, nothing displays in the browser. These are the errors from Firebug, but I also get errors in Chrome.

[E] Ext.util.Event.addListener(): The specified callback function is undefined
Line 12212
Ext.Error: The specified callback function is undefined
Line 11355

Hence, my question is, what is the difference with the "dev" version that could lead to this?

I'm using sencha cmd, ExtJS, Windows 7


25 Apr 2013, 8:40 AM
If you use ext-dev.js in your dev (uncompiled) app do you get any errors/prompts in the console saying classes are missing or are being loaded synchronously?

27 Apr 2013, 3:21 AM
I've had a good look but can't see any other information being output in the Console. My initial thought was that a required class was not being loaded, but I can't see any messages that would confirm this. With the compiled version I just get a blank screen and no errors at all. So, I'm scratching my head on this one and need to work out a way to comment out bits of the app until I can get something working and then find out what is causing the problem.

I have looked at the list of files being compiled and it seems to be correct with all the app files being included, although it's difficult to know if the files are in the correct order.

30 Apr 2013, 6:53 AM
I think this error was down to faulty code such as this below in one of the controllers:

init: function(application) {
click: this.onUploadButtonClick,
scope: this

scope is not a valid config here and caused problems with the -dev version of extjs. When it was removed things started working.

10 Jul 2013, 3:40 AM
Are you sure that scope is not a valid config option? I've seen that in examples, if I'm not mistaken. Maybe it's a bug?