function Init() m.top.observeField("buttonSelected", "CloseDialog") end function function CloseDialog() m.top.close = true end function