-
12 Nov 2012 8:37 AM #1
Unable to build a working app including Chart and Series
Unable to build a working app including Chart and Series
Ext version tested:
- Sencha Touch 2.1 GPL Build date: 2012-10-12 11:45:27 (b94f51d9efb0f248957ae4a843a10cc426897b1d)
- Sencha Cmd 3.0.0.250
- Chrome 23 (Mac OS X)
- Chart classes doesnt seam to be included during build
- Create an app with Pie or any Chart and try to compile it
- Application working as on dev mode
- Blue screen, app not loading and error message about an undefined function
Then troubles occur: I want to compile app using Sencha Cmd.
The simple version of the app (homepage + a list) compiles properly, so far so good.
However, the graph version (homepage + a list + _graphs_) does NOT.
The build output is correct but the result app through 2 errors on Chrome- Errors were:
I observed that Ext.chart.series.Pie class definition was missing from the output app.js file. I kind of figured out how to fix the 404 by adding the file at the appropriate URL.Code:GET https://127.0.0.1:3000/build/mobile-...=1352734936092 404 (Not Found) Uncaught TypeError: object is not a function
- Then I got 3 different errors:
Again I solved them partiall by adding the whole src/chart folder at the appropriate URL.Code:- GET https://127.0.0.1:3000/build/mobile-...=1352736936442 404 (Not Found) app.js:1
- GET https://127.0.0.1:3000/build/mobile-...=1352736936450 404 (Not Found) app.js:1
- Uncaught TypeError: object is not a function
- At the end that error remains:
The full error stack is:Code:Uncaught TypeError: object is not a function
It seams that Series Class is not loaded or something like that related to Chart Classes loading. I dont know how to debug such error.Code:Uncaught TypeError: Cannot call method 'substring' of undefined app.js:2526 Ext.ClassManager.parseNamespace app.js:2526 Ext.ClassManager.get app.js:2602 Ext.ClassManager.instantiate app.js:2766 Ext.ClassManager.instantiateByAlias app.js:2758 Ext.apply.factory app.js:3941 Ext.define.applyInteractions app.js:34845 j app.js:2290 b.implement.initConfig app.js:1998 Ext.define.constructor app.js:9785 b.implement.callParent app.js:1935 Ext.define.constructor app.js:15146 b.implement.callSuper app.js:1939 Ext.define.constructor app.js:25549 b.implement.callSuper app.js:1939 Ext.define.constructor app.js:34631 f app.js:2157 (anonymous function) Ext.ClassManager.instantiate app.js:2788 Ext.ClassManager.instantiateByAlias app.js:2758 Ext.apply.factory app.js:3949 Ext.define.factoryItem app.js:15307 Ext.define.add app.js:15337 Ext.define.applyItems app.js:15256 j app.js:2290 (anonymous function) app.js:2311 Ext.define.applyActiveItem app.js:15624 (anonymous function) app.js:7288 b.implement.initConfig app.js:1998 Ext.define.constructor app.js:9785 b.implement.callParent app.js:1935 Ext.define.constructor app.js:15146 f app.js:2157 (anonymous function) Ext.ClassManager.instantiate app.js:2788 Ext.ClassManager.instantiateByAlias app.js:2758 Ext.apply.factory app.js:3949 Ext.define.factoryItem app.js:15307 Ext.define.add app.js:15337 Ext.define.applyItems app.js:15256 j app.js:2290 (anonymous function) app.js:2311 Ext.define.applyActiveItem app.js:15624 (anonymous function) app.js:7288 b.implement.initConfig app.js:1998 Ext.define.constructor app.js:9785 b.implement.callParent app.js:1935 Ext.define.constructor app.js:15146 f app.js:2157 (anonymous function) Ext.ClassManager.instantiate app.js:2788 Ext.apply.factory app.js:3964 Ext.define.factoryItem app.js:15307 Ext.define.add app.js:15337 Ext.define.applyItems app.js:15256 j app.js:2290 (anonymous function) app.js:2311 Ext.define.applyActiveItem app.js:15624 (anonymous function) app.js:7288 b.implement.initConfig app.js:1998 Ext.define.constructor app.js:9785 b.implement.callParent app.js:1935 Ext.define.constructor app.js:15146 f app.js:2157 (anonymous function) Ext.ClassManager.instantiate app.js:2788 Ext.ClassManager.instantiateByAlias app.js:2758 Ext.apply.factory app.js:3949 Ext.define.factoryItem app.js:15307 Ext.define.add app.js:15337 Ext.application.launch app.js:44390 Ext.define.onDependenciesLoaded app.js:19113 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.define.loadControllerDependencies app.js:19098 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.define.onProfilesLoaded app.js:19083 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 (anonymous function) app.js:18986 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.define.constructor app.js:18984 f app.js:2157 b.onReady app.js:3862 Ext.apply.onDocumentReady app.js:4063 o app.js:3400 Ext.apply.onReady app.js:3404 Ext.onReady app.js:3425 g app.js:3720 Ext.define.doAddListener app.js:42296 Ext.define.changeListener app.js:7098 Ext.define.addListener app.js:7143 (anonymous function) app.js:1896 (anonymous function) app.js:3746 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 (anonymous function) app.js:3745 b app.js:3915 h app.js:3911 Ext.apply.factoryConfig app.js:3905 b app.js:3920 h app.js:3911 Ext.apply.factoryConfig app.js:3905 b app.js:3920 h app.js:3911 Ext.apply.factoryConfig app.js:3905 b app.js:3920 h app.js:3911 Ext.apply.factoryConfig app.js:3905 b app.js:3920 h app.js:3911 Ext.apply.factoryConfig app.js:3905 b app.js:3920 h app.js:3911 Ext.apply.factoryConfig app.js:3905 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 b app.js:3915 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 b app.js:3915 h app.js:3911 b app.js:3915 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875 Ext.apply.require app.js:3315 (anonymous function) app.js:1401 Ext.apply.factoryConfig app.js:3874 b app.js:3920 h app.js:3911 (anonymous function) app.js:3876 Ext.apply.factoryConfig app.js:3905 (anonymous function) app.js:3875
I use Sencha Touch 2.1 GPL (which include theoretically Sencha Chart 2) + Sencha Cmd 3.0.0.250.
The build command is the standard one:
Attached is my app.js resulting file.Code:sencha app build package/testing/production
Any thought? Need more info to figure out what's wrong just tell me. I am working on Sencha since few weeks and that forum has always been resourceful for me. Will be happy to contribute back now
Last edited by vspehner; 12 Nov 2012 at 11:00 AM. Reason: Update to expected bug report format
-
12 Nov 2012 2:53 PM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
This error:
Usually means that an xtype is not present which would mean that you are not requiring something.Uncaught TypeError: Cannot call method 'substring' of undefinedMitchell 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.
-
12 Nov 2012 3:47 PM #3
Error in bug description
Error in bug description
Hum I did a wrong copy and paste for the Stack. Sorry for that Mitchell.
The bug is "Object is not a function" and not "Cannot call method 'substring'"
And the stack isCode:Error evaluating https://127.0.0.1:3000/build/mobile-...duction/app.js with message: TypeError: object is not a function
As said that application works properly whn running in dev/debug mode. I have added the resulting index.html. How to avoid compression of the js part of index.html?Code:G index.html:46 c index.html:47 b index.html:47 (anonymous function) index.html:50 w index.html:50 (anonymous function) index.html:51
Last edited by vspehner; 13 Nov 2012 at 1:14 AM. Reason: clarify a question
-
15 Nov 2012 1:19 AM #4
Up Up
Up Up
So far I havent find any explanation why the build is not including Charts properly into the resulting app.js file. Has anybody already successfully built a chart app with Sencha Touch 2.1 and Sencha Cmd 3.0.0.250?
Last edited by vspehner; 15 Nov 2012 at 1:19 AM. Reason: typo
-
2 Dec 2012 1:37 PM #5
It seems i got the same issue
(http://www.sencha.com/forum/showthre...271#post917271)
Do you find the answer ?
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote