Hi, I cannot get what is happening:
there is a next button which defined :
[lua] self.button_update = ui.newButton {
id = ‘button_update_item’,
default = “item_manager_button_release.png”,
over = “item_manager_button_press.png”,
onRelease = function(event) self:update_clicked(event, self.button_update); end,
text = ‘Update’,
textColor = {0, 0, 255, 255},
}[/lua]
and it’s handler :
[lua]function ItemManager:update_clicked(event)
– system.vibrate()
self.item.name = self:get_name()
self.item.qty = self:get_qty()
self.list_manager:replace_item(self.id, self.item)
print(’—’)
self:remove()
self.list_manager:show()
end[/lua]
The problem is in row [lua]self:remove()[/lua]
it has next code:
[lua]function ItemManager:remove()
native.showAlert(’…’, ‘point 1’, {‘OK’})
self.group.isVisible = false
if isSimulator then
else
native.showAlert(’+++’, ‘ItemManager:remove() inside not simulator’, {‘OK’})
if textField then
textField:removeSelf()
textField = nil
end
if qty_field then
qty_field:removeSelf()
qty_field = nil
end
end
end[/lua]
So the difference is that in simulator everything works fine.
But on device it looks like that function isn’t called. Because
[lua]native.showAlert(’…’, ‘point 1’, {‘OK’})[/lua]
doesn’t appear.
What can it be ? [import]uid: 44975 topic_id: 7906 reply_id: 307906[/import]
