-
28 Feb 2013 5:58 AM #1
[2.1.1] Class loader tries to load already defined class
[2.1.1] Class loader tries to load already defined class
REQUIRED INFORMATION Ext version tested:
- Sencha Touch 2.1.1
- Latest chrome
- Sencha Touch class system tries to load class, that already was defined
- Download the attachement
- Unpack it to the /touch-2.1.1/examples folder
- Open in the browser: touch-2.1.1/examples/class_loading_bug
- Note that an exception about not found Class1 is reported in the console: Failed loading 'Class1.js', please verify that the file exists
- Note, that Class1 is actually already defined in the classes.js
- Class loader should first mark the Class1 as "loaded", same for Class2. Then it should block the definition of Class2 until all the dependencies of Class1 are loaded. Then it can continue to definition of Class2 and other classes, depending on Class1.
- In short - class loader should not try to load the class that was already defined with "Ext.define"
-
28 Feb 2013 6:53 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,117
- Vote Rating
- 454
This is likely because Class1 is waiting for other classes to load until it can actually be defined and since the loading is async Class2 tries to get defined but requires Class1 which isn't defined as it's waiting.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
28 Feb 2013 10:00 AM #3
Right, and Class2 should wait in the same way as Class1 is waiting for its dependencies..
-
16 Apr 2013 2:18 PM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,659
- Vote Rating
- 14
This has been fixed for the next release.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-4066
in
Sprint 33.


Reply With Quote