null is not object evaluating ('_this3_selectRow')
来源:互联网 发布:淘宝日本直邮物流信息 编辑:程序博客网 时间:2024/05/20 22:25
先贴下代码:
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
ListView里的renderRow={this._renderRow},然后会报错,显示null is not an object (evaluating '_this3._pressRow')
,上图:
一看就知道是找不到方法,后来查阅这个资料,知道了解决方法,原来renderRow要与外面的this绑定起来,这个跟Android里的上下文环境Context很像:
- 1
- 2
- 3
- 4
- 5
- 6
- 1
- 2
- 3
- 4
- 5
- 6
http://stackoverflow.com/questions/36303634/reactnative-tapping-row-in-listview-gives-error-cannot-read-property-pressr
0 0
- null is not object evaluating ('_this3_selectRow')
- null is an object evaluating 'this_onPress'
- React Native开发坑之null is not an object (evaluating 'inst.componentWillReceiveProps')
- 运行React Native示例出现null is not an object (evaluating 'this.state.text')
- 【ReactNative】undefined is not an object(evaluating 'this.props.navigator')
- undefined is not an object(evaluating 'this._component.getScrollableNode')
- undefined is not an object (evaluating 'this.props.navigator.push')
- undefined is not an object (evaluating 'dataSource.rowIdentities')
- [ReactNative]undefined is not an object (evaluating 'ImagePickerManager.showImagePicker')
- ReactNative报错:undefined is not an object(evaluating 'RCTCameraRollManager.getPhotos')
- React Native 出现undefined is not an object (evaluating 'this.props.navigator')
- React-Native 0.43.4 undefined is not an object (evaluating '_props[registrationName]') 正确的解决姿势
- React Native报错unddefined is not an object(evaluating ‘_reactnative.propTypes’)解决办法
- undefined is not an object (evaluating 'this.props.nav.push')的解决过程
- dojo.widget' is null or not an object
- is null && is not null
- 出现TypeError: 'undefined' is not a function (evaluating '$')错误
- undefined is not a function (evaluating ‘UIManager.setChildren(containerTag,createdTags)’)
- iOS 去掉html标签
- iOS10本地通知UserNotifications快速入门
- 如何严格设置php中session过期时间
- 一个Win32 C++ 动态连接库的模板 — 调用方可管理DLL分配的内存
- DB2存储过程杂谈
- null is not object evaluating ('_this3_selectRow')
- Android 启动另一个引用的方法记录
- js函数参数和返回值
- 高级容器ApplicationContext的初始过程---总览与概述
- Fragment全解析系列
- Excel规划求解求哪几个数字之和等于一个固定值
- Oracle行转列、列转行的Sql语句总结
- 工厂模式
- spring aop 自动创建代理BeanNameAutoProxyCreator详解