Ui.newEditBox出错了

代码如下:

function XXZombieConfScene:addInputBox()
local function onEdit(event, editbox)
if event == “began” then
– 开始输入
elseif event == “changed” then
– 输入框内容发生变化
elseif event == “ended” then
– 输入结束
elseif event == “return” then
– 从输入框返回
end
end

local editbox = ui.newEditBox({
    image = "EditBox.png",
    listener = onEdit,
    size = CCSize(200, 40)
})


editbox:pos(display.cx, display.cy)
editbox:addTo(self)

end

错误:LUA ERROR: :106: attempt to index global ‘ui’ (a nil value)

使用的quick3.2rc1,cocos ide 1.0.0rc2,请问是什么原因呢?

ui.newEditBox 这个方法是废弃的方法,建议楼主不要使用这个方法,楼主可以使用 cc.ui.UIInput

如果楼主一定要使用必须得在你的config文件里面加上 LOAD_DEPRECATED_API = true

多谢版主大人。