lua 加载table文件

temp.lua

info = {
    textures="testui0.plist",
    designHeight=510,
    designWidth=450,
    widgetTree={
    classname="Panel",
    }
}

加载temp.lua

> = t
nil
> t = assert(loadfile("temp.lua"))
> = t
function: 0x8006b530
> = info
nil
> t()                                       -- 关键就在这里
> = info
table: 0x8005ab48
> = info["designHeight"]
510

具体原因还不清楚

posted @ 2013-06-13 15:07  *tingliang*  阅读(409)  评论(0编辑  收藏  举报