问题
Cannot call method 'substring' of undefined app.js:1
I get this error on the build package version of a sencha touch app that's based on the building your first app tutorial on sencha doc. The regular version runs just fine, but when it is build I Just get a blue screen. The built version runs fine when I comment the proxy related lines for the nestedlist.
proxy: {
type: 'jsonp',
url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog',
reader: {
type: 'json',
rootProperty: 'responseData.feed.entries'
}
}
SOLVED
Most sites claim it is because an xtype is badly written (example), but, in this case it was due to missing explicit requires of things such as the JsonP, NestedList, etc.
回答1:
SOLVED
Most sites claim it is because an xtype is badly written (example), but, in this case it was due to missing explicit requires of things such as the JsonP, NestedList, etc.
回答2:
Try encoding Urls in urls encodeURI or encodeURIComponent.
This should fix it - if not, please post the whole code of this file.
Did you just forget to add to "leaf" and "fields" infos?
来源:https://stackoverflow.com/questions/15642909/cannot-call-method-substring-of-undefined-app-js1-sencha-nested