Hello, everyone, good day.:sign0085:
When test and debug with the emulator or my phone samsung i9100 galaxy s II, all good, but when I get out of the development environment and run my application in my galaxy (No matter if I install the application directly from a folder of the phone or I run the version of the installation that stay in my galaxy after testing), I get a window with the error "An error has occurred in sub : main_pontotmovs (java line: 1531) java.lang.RuntimeException: Object Should be initialized first (Label). Continue? ". Then I Press NO CONTINUE, and rerun it, no longer gives the error. I try to run once more and the same error reappears. That is, every time I run the error alternates. appears once and the next not. I've been looking and can not find the cause.
Here the code where it operates mi Sub pontotmovs, as you can see is a label which is assigned the value of a counter movement.
Sub Process_Globals
'... more code
Dim NumMovim,CantSegs As Int
'... more code
End Sub
Sub Globals
'... more code
Dim lblNumMovs, lblnMovs, lblSeg, lblSegTit, lblMuestra, lblVer, lblAyuda1 As Label
'... more code
End Sub
Sub Activity_Create(FirstTime As Boolean)
If firsttime = True Then
'... more code
NumMovim=0
PonTotMovs
'... more code
End If
End Sub
Sub MuestraTablero
PonTotMovs
'... more code
End Sub
Sub MueveNumero(elValor As Byte, elTag As String)
'... more code
NumMovim=NumMovim+1
'... more code
End Sub
Sub PonTotMovs
lblnMovs.Text = NumMovim
End Sub
My application is a puzzle I want to put to market, but just need to correct this error. Currently my code is about 700 lines.
Thanks in advance for any indication of what I might be doing wrong and I do not see.
Guillermo
When test and debug with the emulator or my phone samsung i9100 galaxy s II, all good, but when I get out of the development environment and run my application in my galaxy (No matter if I install the application directly from a folder of the phone or I run the version of the installation that stay in my galaxy after testing), I get a window with the error "An error has occurred in sub : main_pontotmovs (java line: 1531) java.lang.RuntimeException: Object Should be initialized first (Label). Continue? ". Then I Press NO CONTINUE, and rerun it, no longer gives the error. I try to run once more and the same error reappears. That is, every time I run the error alternates. appears once and the next not. I've been looking and can not find the cause.
Here the code where it operates mi Sub pontotmovs, as you can see is a label which is assigned the value of a counter movement.
Sub Process_Globals
'... more code
Dim NumMovim,CantSegs As Int
'... more code
End Sub
Sub Globals
'... more code
Dim lblNumMovs, lblnMovs, lblSeg, lblSegTit, lblMuestra, lblVer, lblAyuda1 As Label
'... more code
End Sub
Sub Activity_Create(FirstTime As Boolean)
If firsttime = True Then
'... more code
NumMovim=0
PonTotMovs
'... more code
End If
End Sub
Sub MuestraTablero
PonTotMovs
'... more code
End Sub
Sub MueveNumero(elValor As Byte, elTag As String)
'... more code
NumMovim=NumMovim+1
'... more code
End Sub
Sub PonTotMovs
lblnMovs.Text = NumMovim
End Sub
My application is a puzzle I want to put to market, but just need to correct this error. Currently my code is about 700 lines.
Thanks in advance for any indication of what I might be doing wrong and I do not see.
Guillermo