错误:
Adding an event listener to a proxy that isn't already in the context。
用 navGroup打开一个window,然后新建leftnavbutton,并注册事件,会报错:
Adding an event listener to a proxy that isn't already in the context。
一步步删代码,发现是事件注册问题。。
网上资料:http://developer.appcelerator.com/question/135176/error-adding-an-event-listener-to-a-proxy-that-isnt-already-in-the-context#answer-237243
“A quick and dirty fix for this issue is to set the backgroundGradient AFTER you have created the button and added it to a view. This will put the button into the context and prevent this message from displaying.”
我觉得这句话有点道理,所以我加了settimeout来延时注册 button的事件,有一定效果额~
不知道这么做会有什么后遗症。。。
setTimeout(function() {
leftButton.addEventListener("click", function() {
currentWindow.fireEvent("closeWindow");
});
}, 50);
分享到:
相关推荐
Titanium中文版开发手册(翻译版)
[Packt Publishing] Appcelerator Titanium 移动应用开发教程 (英文版) [Packt Publishing] Creating Mobile Apps with Appcelerator Titanium (E-Book) ☆ 图书概要:☆ Develop fully-featured mobile ...
NULL 博文链接:https://rensanning.iteye.com/blog/1415689
使用基于javascript的Titanium Mobile 技术跨平台开发原生iOS和Android 应用培训教程
TITANIUM适合于小规模、多平台的移动APP开发,借用JS语法,使用非常方便。但是不能对象化,希望快速开始APP开发的童鞋可以参考。 本书是全英文的。最好的TITANIUM教程个人认为是lynda的教程,没有下载,大家老老...
Titanium官方移动终端开发API文档
atom-titanium, 用于 Titanium 合金的Atom 封装 用于 Titanium 合金的 All-in-One封装这是一个用于 Titanium 合金的Atom 封装。$ apm install titanium-alloy冲突&需要通知Alloy 1.8. x
在Mac上搭建Titanium的iOS开发环境
安卓手机系统备软件 第一次使用钛备份的朋友,可以试着...接着按返回键(手机底部四大金刚中的那个返回键)按钮逐层回退,然后选择sdcard-ext/TitaniumBackup即可(没有 TitaniumBackup文件夹的请自行创建一个):
Titanium Backup_3.7.4捐赠完全版
TitaniumBackup_6.0.5.1 专业版 可静默恢复
[Packt Publishing] Appcelerator Titanium 商业应用开发经典实例 (英文版) [Packt Publishing] Appcelerator Titanium Business Application Development Cookbook (E-Book) ☆ 出版信息:☆ [作者信息] ...
titanium-d1-kickstart.6.1.1.gbin 强大的思科模拟器
Titanium使用JavaScript来开发原生iOSAndroid和Windows应用
stored in the ECU memory, all you have to do is upload the file and the software starts a search for the presence of both the compatible drivers database. Now, thanks to the studies of our developers...
Titanium[1].Backup.Pro.v3.7.2_cnFixed_newkey.apk Titanium[1].Backup.Pro.v3.7.2_cnFixed_newkey.apk
命令描述键绑定Titanium: Create application 创建一个新的Titanium应用程序项目-- Titanium: Create module 创建一个新的Titanium模块项目-- Titanium: Enable LiveView 启用LiveView -- Titanium: Disable ...
这是截至到目前最新的版本(Titanium 2.1 API) 方便没网的情况下,童鞋们翻阅文档。
钛备份 Titanium Backup,备份你的程序及程序数据,并支持定时备份等功能。 功能很强大,有此软件,不管你的格机还是重刷ROM,在重装软件时都是无痛的,非实适用经常捣鼓手机有机友! 解锁器使用说明: 1.安装钛...
Google-Cloud-Messaging--Titanium-, 在 Titanium 中,Google云消息传递 Google-Cloud-Messaging--Titanium -注册带有GCM和处理发送到设备的通知的Titanium MODULE 。Android平台使用c2dm进行推送,但是因为c2dm停止...