Estoy realizando una aplicación con 3 layout (main,pantalla1,pantalla2), el programa compila y corre, la navegación entre los layout funciona correctamente, ingreso los datos en los EditText pero al pulsar el Button para realizar los cálculos, se despliega el siguiente mensaje de error " An error has ocurred in sub: pantalla1_btnr_click (java line:277). Java.lang Runtime.Exception: Object should first be initialized (EditText). continue?, soy novato en esto de la programacion y seguramente he omitido algo simple, agradezco la orientación que me puedan dar al respecto, adjunto código del layout "pantalla1"
'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim IpR,IsR,IpN,IpS,IsS,IpT,IsT As Double
Dim RelR,RelS,RelT,ErrorR,ErrorS,ErrorT As Double
Dim EditTextIpR,EditTextIsR,EditTextIpN As EditText
Dim EditTextIpS,EditTextIsS As EditText
Dim EditTextIpT,EditTextIsT As EditText
Dim LblRelR,LblRelS,LblRelT,LblErrorR,LblErrorS,LblErrorT As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Pantalla1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub BtnR_Click
IpR = EditTextIpR.Text
IsR = EditTextIsR.Text
IpN = EditTextIpN.Text
RelR = IpR/IsR
LblRelR.Text = RelR
ErrorR = 100*((IpN/5)-RelR)/RelR
LblErrorR.Text = ErrorR
End Sub
Sub BtnS_Click
IpS = EditTextIpS.Text
IsS = EditTextIsS.Text
IpN = EditTextIpN.Text
RelS = IpS/IsS
LblRelS.Text = RelS
ErrorS = 100*((IpN/5)-RelS)/RelS
LblErrorS.Text = ErrorS
End Sub
Sub BtnT_Click
IpT = EditTextIpT.Text
IsT = EditTextIsT.Text
IpN = EditTextIpN.Text
RelT = IpT/IsT
LblRelT.Text = RelT
ErrorT = 100*((IpN/5)-RelT)/RelT
LblErrorT.Text = ErrorT
End Sub
Sub Button1_Click
StartActivity("main") 'regresa al menu principal
End Sub
Sub Button2_Click
StartActivity("pantalla2") 'salta a calcular la conexion a 3 elementos
End Sub
'Activity module
Sub Process_Globals
End Sub
Sub Globals
Dim IpR,IsR,IpN,IpS,IsS,IpT,IsT As Double
Dim RelR,RelS,RelT,ErrorR,ErrorS,ErrorT As Double
Dim EditTextIpR,EditTextIsR,EditTextIpN As EditText
Dim EditTextIpS,EditTextIsS As EditText
Dim EditTextIpT,EditTextIsT As EditText
Dim LblRelR,LblRelS,LblRelT,LblErrorR,LblErrorS,LblErrorT As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Pantalla1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub BtnR_Click
IpR = EditTextIpR.Text
IsR = EditTextIsR.Text
IpN = EditTextIpN.Text
RelR = IpR/IsR
LblRelR.Text = RelR
ErrorR = 100*((IpN/5)-RelR)/RelR
LblErrorR.Text = ErrorR
End Sub
Sub BtnS_Click
IpS = EditTextIpS.Text
IsS = EditTextIsS.Text
IpN = EditTextIpN.Text
RelS = IpS/IsS
LblRelS.Text = RelS
ErrorS = 100*((IpN/5)-RelS)/RelS
LblErrorS.Text = ErrorS
End Sub
Sub BtnT_Click
IpT = EditTextIpT.Text
IsT = EditTextIsT.Text
IpN = EditTextIpN.Text
RelT = IpT/IsT
LblRelT.Text = RelT
ErrorT = 100*((IpN/5)-RelT)/RelT
LblErrorT.Text = ErrorT
End Sub
Sub Button1_Click
StartActivity("main") 'regresa al menu principal
End Sub
Sub Button2_Click
StartActivity("pantalla2") 'salta a calcular la conexion a 3 elementos
End Sub