您的位置:首页 > 其它

[Phonegap+Sencha Touch] 移动开发38 sencha 2.3.2+ 在 安卓2.3上使用报错 - has no method 'bind'

2014-11-20 14:27 441 查看
sencha 2.3.2和2.4.0在安卓2.3上面用会报错,具体报错信息如下:

Object function (a){if(!Ext.getBody().contains(a.target)){this.onTouchMove(a)}} has no method 'bind' at file:///android_asset/www/app.js:1

解决办法是:

打开文件:你的App\touch\src\event\publisher\TouchGesture.js

找到第66行:

if (Ext.feature.has.Touch) {
      // bind handlers that are only invoked when the browser has touchevents
      me.onTargetTouchMove = me.onTargetTouchMove.bind(me);
      me.onTargetTouchEnd = me.onTargetTouchEnd.bind(me);
}


改为

if (Ext.feature.has.Touch) {
    // bind handlers that are only invoked when the browser has touchevents
    me.onTargetTouchMove = Ext.Function.bind(me.onTargetTouchMove, me);
    me.onTargetTouchEnd = Ext.Function.bind(me.onTargetTouchEnd, me);
}


然后就好了

欢迎加入Sencha Touch + Phonegap 群:194182999

共同学习交流(博主QQ:479858761
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐