In my app I compile fine, but then I get paused on certain lines in my code during running it. First it tells me:
I am not sure it is is correct, but I put:
The ListView1 is names ListView1 and the Event Name is ListView1 as well. It let me pass that in the next run it pauses then highlights this:
It highlights the line 'Blue1.Top = 147' and says "Object should first be initialized (ImageView). The ImageView is named Blue1 and the Event Name is Blue1 as well so I thought the same as above and did.
It then runs through and says "Last Exception java.lang.NullPointerException" under Local Variables
Here is my log:
What is strange to me is that in my test program to see if my method would work I didn't have to initialize the ListView or ImageView...only the Map. Now I am forced to initialize them and then get the NullPointException error.
:BangHead:
:sign0163:
Object should fist be initialized (ListView)
I am not sure it is is correct, but I put:
B4X:
ListView1.Initialize(ListView1)
The ListView1 is names ListView1 and the Event Name is ListView1 as well. It let me pass that in the next run it pauses then highlights this:
B4X:
If Blue1Location = 15 Then
Blue1.Top = 147
Blue1.Left = 677
End If
It highlights the line 'Blue1.Top = 147' and says "Object should first be initialized (ImageView). The ImageView is named Blue1 and the Event Name is Blue1 as well so I thought the same as above and did.
B4X:
Blue1.Initialize(Blue1)
It then runs through and says "Last Exception java.lang.NullPointerException" under Local Variables
Here is my log:
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (gamescreen1) Create, isFirst = true **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (gamescreen1) Create, isFirst = true **
gamescreen1_setblue1location (B4A line: 892)
Blue1.Top = 147
java.lang.NullPointerException
at anywheresoftware.b4a.objects.ViewWrapper.setTop(ViewWrapper.java:139)
at triangle.puzzler.gamescreen1._setblue1location(gamescreen1.java:4895)
at triangle.puzzler.gamescreen1._generatelocations(gamescreen1.java:2099)
at triangle.puzzler.gamescreen1._activity_create(gamescreen1.java:617)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:113)
at triangle.puzzler.gamescreen1.afterFirstLayout(gamescreen1.java:84)
at triangle.puzzler.gamescreen1.access$100(gamescreen1.java:16)
at triangle.puzzler.gamescreen1$WaitForLayout.run(gamescreen1.java:72)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
What is strange to me is that in my test program to see if my method would work I didn't have to initialize the ListView or ImageView...only the Map. Now I am forced to initialize them and then get the NullPointException error.
:BangHead:
:sign0163: