hello bro
i am trying to insert rects table that contain 10 objects (all those objects have touch listener) to scrollview, but i get error insert to scrollview
this is some part of my code:
local widget=require “widget”
local scorllView =widget.newScrollView()
local rect1s = {}
for i = 1, 10 do
rect1 =display.newRect(display.contentCenterX,0,250,200)
rect1s[i] = rect1
end
for i=1 ,10 do
scrollView:insert (rect1s[i])
end
function touchListener( event )
–here some simple code
end
for i=1 , 10 do
rect1s[i]:addEventListener(“touch”,touchListener)
end