hi,
we are trying to draw a line simply using circles in a event which is tied to enterframe.(moved)
the line draws fine initially. When we switch screens using director 1.2 and are back on the same screen, we get a strange error, when we try to insert this table in the display group(called traceScreen)
handWritten is a array which stored all circles to be drawn
attempt to call insert : a nil value
any clues whu we may be getting this error
[lua]function drawline(event)
if event.x < 260 or event.y < 590 then return end
if event.x > 495 or event.y > 800 then return end
if(event.phase==“moved”) then
handWritten[#handWritten+1] = display.newCircle(event.x,event.y,16)
handWritten[#handWritten]:setFillColor(rcolor, gcolor, bcolor)
– here is the line with error below
traceScreen:insert(handWritten[#handWritten])
print("Circles Drawn: "…#handWritten)
end[/lua]
[import]uid: 55009 topic_id: 12661 reply_id: 312661[/import]