Ciao a tutti,
ho bisogno di supporto in quanto ho seguito la documentazione per creare una MobileMessageBox:
https://documentation.xojo.com/topics/user_interface/ios/understanding_the_message_box.html
Ho creato in un Button una MessaDialog:
Var testMessage as New MobileMessageBox
Var buttons() As String
testMessage.Title = "Sei sicuro?"
testMessage.Message = "Se vuoi cancellare la nota clicca su Si"
buttons.AddRow("No")
buttons.AddRow("Si")
testMessage.Buttons = buttons
AddHandler testMessage.Pressed, AddressOf testMessagePressed
testMessage.Show
In seguito sempre all’interno dello stesso MobileScreen ho creato la funzione:
Private Sub testMessagePressed(sender As MobileMessageBox, index As Integer)
if index = 0 then
RemoveHandler sender.Pressed, AddressOf sicuroMessagePressed
else
eliminaDato
RemoveHandler sender.Pressed, AddressOf sicuroMessagePressed
end if
End Sub
Il popup con la MessageDialog si visualizza, se clicco su SI e NO non entra mai nel metodo testMessagePressed. Mi sono messo in debug, ho cambiato nome, ma niente.
Sto commentando un errore? qualcuno sa aiutarmi?
Grazie Mille