PDA

View Full Version : Network 404 error



silcreval
8 Jan 2012, 5:18 PM
I have an application which has run OK through the SDK tools.

When I run it I get a Network 404 as it attempts to load a file from the ext
folder. This file is the TabCloseMenu.js file in /ext/examples/ux

The file is correctly 'required' in the js files, but it is not included I noticed
in the jsb3 file automatically.

I've no idea why this particular file fails, but one thing that is different about it
is that it is a plugin so its used with

Ext.create('Ext.ux.TabCloseMenu')

of course this works perfectly in the regular debug mode.

Another thing I've noticed is that it fails because the file path for the file is
wrong in the GET call. It is correctly defined in the 'requires' path though,
and as I say works perfectly in regular ext-debug mode.

Any idea how to get rid of this issue?

silcreval
8 Jan 2012, 9:51 PM
Debugging this a bit more. I've noticed that the files required are actually included in the app-all.js but the Loader is still attempting to load them (with the wrong path).

silcreval
9 Jan 2012, 7:58 AM
OK - I think I fixed this. Just appending here in case anyone else runs into this.

I have two javascript file systems in use, one is 'js' and the other is '../ext' ie the
ext classes.

For my classes I always use 'Ext.ux' as a prefix, however there are some classes
in '../ext/examples/ux' that I use and these also have the 'Ext.ux' prefix.

The setPath therefore has (amongst other things):

'Ext.ux': '../ext/examples/ux',
'Ext.ux.MYSTUFF': 'js/MYSTUFF'

I think because 'Ext.ux' is pivoting around two separate file paths depending
on the postfix 'MYSTUFF' this seems to cause confusion.

I reworked the class names to avoid this, and this solved the problem.

Cualit
17 May 2013, 8:42 AM
In my case, in order to create a successfull build with Sencha SDK and my JSB3 file include the Ext.ux.TabCloseMenu class, I had to manually switch the className with the alternateClassName in the file Ext.ux.TabCloseMenu.

The problem seems to be within the Build process behind generating the JSB3 file, that does not take into account alternateClassNames to resolve dependencies.

Cheers I hope this helps someone!