Good morning,
regarding the code for writing TUI interfaces already started in a previous post (https://www.b4x.com/android/forum/threads/solved-lanterna.161843/#post-992685)
I'm trying to understand how to call a modal window that accepts the classic "YES" and "No" to understand how to proceed.
I tried adding this sub to the code:
and then recall it via:
Unfortunately I always get the following response:
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Method: showMessageDialog not matched.
Can you give me some suggestions?
regarding the code for writing TUI interfaces already started in a previous post (https://www.b4x.com/android/forum/threads/solved-lanterna.161843/#post-992685)
I'm trying to understand how to call a modal window that accepts the classic "YES" and "No" to understand how to proceed.
I tried adding this sub to the code:
Code:
Sub ShowMessageDialog(title As String, message As String)
' Inizializza MessageDialogButton staticamente
Dim MessageDialogButton As JavaObject
MessageDialogButton.InitializeStatic("com.googlecode.lanterna.gui2.dialogs.MessageDialogButton")
' Ottiene il pulsante OK staticamente
Dim buttonOK As Object = MessageDialogButton.GetField("OK")
' Inizializza MessageDialog e chiama il metodo showMessageDialog
Dim MessageDialog As JavaObject
MessageDialog.InitializeStatic("com.googlecode.lanterna.gui2.dialogs.MessageDialog")
' Esegui il metodo showMessageDialog con i parametri corretti
MessageDialog.RunMethod("showMessageDialog", Array As Object(gui, title, message, Array As Object(buttonOK)))
End Sub
and then recall it via:
code2:
ShowMessageDialog("WARNING", "Operazione non rilevata!")
Unfortunately I always get the following response:
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Method: showMessageDialog not matched.
Can you give me some suggestions?