Hello,
I am writing an app that has 3 editext, I want to call a calculator (tapecalc) from a menu button and bring the result from the calculator to the edittext that was with the focus when the calculator menu button was clicked. I'm doing this but is not working.
Resultado is declared in Sub Process_Globals from tapecalc activity.
What am I doing wrong ?
Thanks.
I am writing an app that has 3 editext, I want to call a calculator (tapecalc) from a menu button and bring the result from the calculator to the edittext that was with the focus when the calculator menu button was clicked. I'm doing this but is not working.
B4X:
Sub Globals
Dim txtN As EditText
Dim txtD As EditText
Dim txtI As EditText
Dim Send As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
txtN.Initialize("edText")
txtD.Initialize("edText")
txtI.Initialize("edText")
'
txtN.RequestFocus
End Sub
Sub Activity_Resume
'Msgbox(TapeCalc.Resultado,"Resultado")
If Sender = Null Then
Msgbox("Nulo","Sender")
Else
Msgbox(Send,"Sender")
Send.Text = TapeCalc.Resultado
End If
End Sub
Sub edText_FocusChanged (HasFocus As Boolean)
Send = Sender
End Sub
Resultado is declared in Sub Process_Globals from tapecalc activity.
What am I doing wrong ?
Thanks.