I would like to do things with the scrollview if I interact with one of the elements that I’ve inserted into it.
However, the element.parent is not the scrollview.
Here is some test code:
local widget = require("widget") local sv = widget.newScrollView() local test = display.newGroup() sv:insert(test) print(sv) print(test.parent)
Am I wrong in assuming those two tables should be the same value?
This isn’t too much of a problem however as I can just pass the scrollview’s reference to each element when I create them.
test.super = sv