View Full Version : Error while trying to split code into different files

10 Jan 2014, 6:58 AM
I have created a simple fiddle, everything worked fine if I had everything in one file.
Now I would like to split everything into different files, but I get errors that files are not found.
My fiddle: https://fiddle.sencha.com/#fiddle/2ie I use Ext.ux in this one so I get error:
GET https://extjs.cachefly.net/ext/gpl/4.2.0/examples/ux/form/field/TodoList.js?_dc=1389365839675 404 (Not Found)

Second fiddle: https://fiddle.sencha.com/#fiddle/2if I get this error:
GET https://fiddle.sencha.com/My/ux/form/field/TodoList.js?_dc=1389365783305 404 (Not Found)

How should we include external files?

10 Jan 2014, 7:03 AM
This post may help: http://www.sencha.com/forum/showthread.php?276735-Fiddle-not-loading-user-defined-classes&p=1013549&viewfull=1#post1013549

What's going on is all the code is literally just dumped in and no order is guaranteed, it goes in order of how it shows in the tree panel. Since all the code is dumped in, the Ext.require is not needed and the cause of the 404 because it actually is trying to load a file. I do have a fix in for Fiddle 1.1 (not currently released) where it guarantees the code for app.js is loaded after all other files.

10 Jan 2014, 7:59 AM
So for now best solution would be to include all code in main js file.
Any plans for releasing 1.1? When can we expect it?
Any other things will be added?

10 Jan 2014, 8:00 AM
All you should have to do is have the resources show above app.js in the tree panel (via the name of the folder)

10 Jan 2014, 8:03 AM
I'll try that :)
Any news on Fiddle 1.1?:)

10 Jan 2014, 8:07 AM
It's currently pending release, have had a few things come up but will have a few more improvements like to search


10 Jan 2014, 8:10 AM
Already seen this threads :)
Thanks for help Mitchell.

16 Jan 2014, 11:13 PM
The new code must have helped. I think it should work. Try putting the whole thing again.
What new code?
Version 1.1 isn't released so for now all code must be in same file of above app.js

22 Jan 2014, 11:47 PM
Your forum provided us with valuable information to work with. Each & every tips of your post are awesome. Thanks a lot for sharing.