TC官方合作论坛

标题: 命名空间无法用字符串变量传递 [打印本页]

作者: simonw    时间: 2013-8-26 14:44
标题: 命名空间无法用字符串变量传递
thread.beginthread("ns1.run","") //this is right

funname="ns1.run"
thread.beginthread(funname,"") //this is wrong

作者: sugar987009    时间: 2013-8-26 15:59
学习学习
作者: 既生瑜何生亮    时间: 2013-8-26 17:35
这个必须这么写,因为编译的时候会检测这个命名空间的函数是否存在,由于是静态编译,你先赋值给变量就无法检测到这个错误的
作者: simonw    时间: 2013-8-26 17:43
回复 3楼既生瑜何生亮的帖子

版主再看看我这个贴
http://bbs.tyuyan.com/thread-30080-1-1.html




欢迎光临 TC官方合作论坛 (http://bbs.52tc.co/) Powered by Discuz! X3.1