I couldn't get wait to work like wait in a small class.
I'm definitely making a mistake.
I am attaching a class (Savearq) where a wait not wait.
Thanks in advance to anyone who can help.
I'm definitely making a mistake.
I am attaching a class (Savearq) where a wait not wait.
Thanks in advance to anyone who can help.
Class Savearq:
Sub Class_Globals
Private DialogLayout As CustomLayoutDialog
Private NomeModelo As FloatLabeledEditText
Dim SFF As StringFunctions
Dim IME As IME
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
IME.Initialize("IME")
End Sub
Sub Savefile
Dim SF As Object = DialogLayout.ShowAsync("File name to be saved", "Ok", "", "", Null, True)
DialogLayout.SetSize(100%x, 250dip)
Wait For (SF) Dialog_Ready(pnl As Panel) ' <======= WAIT NOT WAIT HERE !
pnl.LoadLayout("DialogLayout")
NomeModelo.EditText.RequestFocus
CallSubDelayed(Me,"SetKeyboard1")
DialogLayout.GetButton(DialogResponse.POSITIVE).Enabled = True
Wait For (SF) Dialog_Result(res As Int)
'force the keyboard to hide
NomeModelo.EditText.Enabled = False
If res = DialogResponse.POSITIVE Then
If SFF.Len(NomeModelo.EditText.Text) > 0 Then
Main.XXX = NomeModelo.EditText.Text
End If
End If
End Sub
Sub SetKeyboard1
Sleep(100)
IME.ShowKeyboard(NomeModelo.EditText)
End Sub
Last edited: