白鹭学习回调
来源:互联网 发布:mac os wifi未安装硬件 编辑:程序博客网 时间:2024/04/28 02:23
回调的三种方式咱先不说 只聊聊第一种方式
typedef void (__stdcall *DownloadCallback)(const char* pURL, bool bOK);
void DownloadFile(const char* pURL, DownloadCallback callback)
{
cout << "downloading: " << pURL << "" << endl;
callback(pURL, true);
}
void __stdcall OnDownloadFinished(const char* pURL, bool bOK)
{
cout << "OnDownloadFinished, URL:" << pURL << " status:" << bOK << endl;
}
function alert_show(contentStr: string, showCancel: boolean = false,
callbackFunc: Function = null,callbackFuncParams: any[] = null,
callbackFuncThisObject = null,
cancelFunc: Function = null,
cancelFuncParams: any[] = null,
cancelFuncThisObject = null) {
var alertView = manager.popupManager().openPopup(views.popups.AlertView, true) as views.popups.AlertView;
alertView.setContent(contentStr);
alertView.showCancelBtn = showCancel;
alertView.setCallback(callbackFunc, callbackFuncParams, callbackFuncThisObject, cancelFunc, cancelFuncParams, cancelFuncThisObject);
}
/**
* 设置回调函数,不传参数就是清除回调的意思
*/
public setCallback(callbackFunc?: Function, callbackFuncParams?: any[], callbackFuncThisObject?: any, cancelFunc?: Function, cancelFuncParams?: any[], cancelFuncThisObject?: any): void {
this._callbackFunc = callbackFunc;
this._callbackFuncParams = callbackFuncParams;
this._callbackFuncThisObject = callbackFuncThisObject;
this._cancelFunc = cancelFunc;
this._cancelFuncParams = cancelFuncParams;
this._cancelFuncThisObject = cancelFuncThisObject;
}
- 白鹭学习回调
- egret(白鹭引擎) 学习历程(二)
- 游戏引擎 白鹭(egret)学习总结(一)
- poker -3 +白鹭引擎
- Egret 白鹭引擎实践
- 白鹭资源加载
- Egret---白鹭引擎
- 白鹭起飞处(1)
- 白鹭起飞处(2)
- 白鹭引擎(Egret Engine )
- egret白鹭引擎基础介绍
- 白鹭(egret)搜素引擎入门
- 简单介绍了解白鹭引擎Egret
- 白鹭引擎Egret在windows下安装
- 白鹭时代到底怎么样有前途么
- 白鹭引擎Egret入门知识补充
- 闪客工具:白鹭资源导航
- 白鹭中get和set的作用
- jstl函数
- [spring] Annotation <context:annotation-config> 和 <context:component-scan>诠释及区别
- Anroid Studio 添加SVN server,TortoiseSVN版本管理。
- 最小生成树——prim算法(个人总结)
- Linux下的压缩解压缩命令详解
- 白鹭学习回调
- Javaweb监听器
- win10禁止系统自动更新,太讨厌了
- 数组(JS)
- 黎活明给程序员的忠告 收藏
- memcache分布式集群算法——一致性哈希算法
- c++第二次实验-1个人所得税计算器
- 7 Important Model Evaluation Error Metrics Everyone should know
- JavaScript之基本语法