Hi
I am creating a scrollView as follows:
local scrollView = widget.newScrollView
{
top = screenheight*0.2,
left = margin,
width = screenwidth - margin*2,
height = screenheight - screenheight*0.2 - margin,
}
root:insert(scrollView)
Then in a loop I add several images/buttons to it. It all renders fine and works OK but there was a slowdown if when I transitioned out and came back into this screen. I noticed that this was because of a huge number or error messages and stack traces being written out. There seems to be a runtime error. Here are a few of the errors, the repeat a hundred or so times…I guess each time I add an element to the scrollView. “TopFrame” seems to be related to the scrollbars and the parameter scrollBarOptions is optional I believe. Am I doing something wrong ?
11-09 12:14:34.986: I/Corona(10999): Runtime error
11-09 12:14:34.986: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: attempt to index field ‘topFrame’ (a nil value)
11-09 12:14:34.986: I/Corona(10999): stack traceback:
11-09 12:14:34.986: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: in function ‘createScrollBar’
11-09 12:14:34.986: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_scrollview.lua:411: in function ‘listener’
11-09 12:14:34.986: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/timer/timer.lua:173: in function ‘method’
11-09 12:14:34.986: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/platform/resources/init.lua:253: in function </Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/platform/resources/init.lua:221>
11-09 12:14:35.036: I/Corona(10999): Runtime error
11-09 12:14:35.036: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: attempt to index field ‘topFrame’ (a nil value)
11-09 12:14:35.036: I/Corona(10999): stack traceback:
11-09 12:14:35.036: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: in function ‘createScrollBar’
11-09 12:14:35.036: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_scrollview.lua:411: in function ‘listener’
11-09 12:14:35.036: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/timer/timer.lua:173: in function ‘method’
11-09 12:14:35.036: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/platform/resources/init.lua:253: in function </Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/platform/resources/init.lua:221>
11-09 12:14:35.046: I/Corona(10999): Runtime error
11-09 12:14:35.046: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: attempt to index field ‘topFrame’ (a nil value)
11-09 12:14:35.046: I/Corona(10999): stack traceback:
…
…
…
…
…
…
11-09 12:14:42.636: I/Corona(10999): Runtime error
11-09 12:14:42.636: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: attempt to index field ‘topFrame’ (a nil value)
11-09 12:14:42.636: I/Corona(10999): stack traceback:
11-09 12:14:42.636: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_momentumScrolling.lua:713: in function ‘createScrollBar’
11-09 12:14:42.636: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/widget/widgetLibrary/widget_scrollview.lua:411: in function ‘listener’
11-09 12:14:42.636: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/subrepos/timer/timer.lua:173: in function ‘method’
11-09 12:14:42.636: I/Corona(10999): /Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/platform/resources/init.lua:253: in function </Users/jenkins/slaveroot/workspace/CoronaCards/OS/android/platform/resources/init.lua:221>