Sorry I've removed your post by error !
Here is the code that causes the bug you described, where only the Button1:onClick() event is called even when the Button2 is clicked :
local ui = require "ui"
local win = ui.Window("MobiApp", "fixed", 1024, 600)
local newWindow = ui.Groupbox(win, "newWindow", 170, 10, 844, 580)
local Button1 = ui.Button(newWindow, "Button1", 10, 20, 150, 30)
local Button2 = ui.Button(newWindow, "Button2", 170, 20, 150, 30)
function Button1:onClick()
ui.msg("Button1", "Test")
end
function Button2:onClick()
ui.msg("Button2", "Test")
end
win:show()
repeat
ui.update()
until win.visible == false