A NullPointerException error shows at the Cnv.Initialize(Pnl) line in the following sample:
Dim SV As ScrollView
Dim Pnl As Panel
Dim Cnv As Canvas
Dim Pth As Path
SV.Initialize(1000dip)
Pnl.Initialize("")
Activity.AddView(SV,10%x,10%y,20%x,20%y)
Cnv.Initialize(Pnl)
Pth.Initialize(5%x,5%y)
Pth.LineTo(8%x,5%y)
Cnv.DrawPath(Pth,Colors.Black,False,1)
Pnl.Invalidate
Can someone tell me how to correct this attempt to draw a line segment?
Dim SV As ScrollView
Dim Pnl As Panel
Dim Cnv As Canvas
Dim Pth As Path
SV.Initialize(1000dip)
Pnl.Initialize("")
Activity.AddView(SV,10%x,10%y,20%x,20%y)
Cnv.Initialize(Pnl)
Pth.Initialize(5%x,5%y)
Pth.LineTo(8%x,5%y)
Cnv.DrawPath(Pth,Colors.Black,False,1)
Pnl.Invalidate
Can someone tell me how to correct this attempt to draw a line segment?