I was working on this layout and, between changes, I don't know why started presenting this error.
Line 30 ==> Parent.LoadLayout("Drawing")
Any clues, will be welcome.
Regards,
Fernando
Line 30 ==> Parent.LoadLayout("Drawing")
- Error occurred on line: 30 (Drawings)
- java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.reflect.Type[] java.lang.reflect.ParameterizedType.getActualTypeArguments()' on a null object reference
- at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
B4X:
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize(Parent As B4XView)
Parent.LoadLayout("Drawing")
canvas.Initialize(pnlDrawing)
' Colors: (0)Fundo0 (1)Fundo1 (2)Snake (3)Bird (4)vago
wColors.Initialize2(Array As Int(0xFFAFCDAF, 0xFFAFC6AF, 0xFF0000FF, 0xFFFF4500, 0xFFDDA0DD))
fundoRect.Initialize(10dip, 10dip, 10dip, 10dip)
pnlDrawing.Top = 0
pnlDrawing.left = 0
wLineWidth = pnlDrawing.Width - wMargin
wColumnHeight = pnlDrawing.Height - wMargin - wBottonMargin
wMaxColumns = (wLineWidth / (wCellSize + wGridLine)) - 1
wMaxLines = (wColumnHeight / (wCellSize + wGridLine)) - 2
pnlKeys.left = (pnlDrawing.width - 95dip) / 2
Log("Gridsize: " & wMaxColumns & ", " & wMaxLines)
SnakeSize = 1
SnakeDir = KEY_RIGHT ' 1=Up 2=Down 3=Left 4=Right 0=Stop
TabSnakeCell(0) = GetCell(Rnd(5, wMaxLines - 5), wMaxColumns)
TabSnakeDir(0) = KEY_RIGHT
PlotBird
PlotSnake
SnakeMove
End Sub
Any clues, will be welcome.
Regards,
Fernando