Cannot call method 'substring' of undefined app.js:1 sencha nested

帅比萌擦擦* 提交于 2020-01-23 23:29:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!