代码如下:
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)
请教各位,是什么问题,使用的是quick-3.2rc1,cocos ide 1.0.0rc2