Hi everyone, i need to disable some widget.buttons on press, please can you help me to do that??
local widget = require("widget")
local myGroup = display.newGroup()
local button
local b = function()
print("bb")
--HERE I WANT TO DISABLE myButton
--myButton.disablesomething!!!!!!!!
local a = function()
--HERE I WANT TO REABLE myButton
--myButton.re-able-me!!!!!
print("aa")
end
button = widget.newButton{
x = 100,
y = 100,
id = 1,
label="aaa " ,
onRelease = a
}
myGroup:insert( button.view )
end
myButton = widget.newButton{
x = 100,
y = 200,
id = 1,
label="aaa " ,
onRelease = b
}
myGroup:insert( myButton.view )
Hope you understand the problem.
Help me fix it!! [import]uid: 30837 topic_id: 13486 reply_id: 313486[/import]
