This should not throw an error:
scrollView:scrollToPosition( -500, nil,500, scrollComplete )
or
scrollView:scrollToPosition( -500,0,500, scrollComplete )
Now throws strange error like this (in simulator)
?:0: attempt to index a number value
stack traceback:
[C]: ?
?: in function ‘scrollToPosition’
…ut\sprout2013\2013_new\scrolltopositiontest\main.lua:22: in function
‘main’
Full code of a test main.lua for examination (not my production code, but an example used to send a bug report).
function main()
print("testing basic scroll to position")
local widget = require "widget"
function scrollComplete()
----print "scroll to brand complete"
end
local scrollView = widget.newScrollView{
width = 800,
height = 200,
scrollWidth = 800,
scrollHeight =0,
bgColor= {255, 255,255 ,255},
top=510,
left=110,
listener=scrollViewListener,
verticalScrollDisabled=true
}
scrollView:scrollToPosition( -500, nil,500, scrollComplete )
end
main()
Any ideas when or why this stopped working. There have been some changes to the widgets lately that have been causing errors (I’m looking at you, scrollView.content.verticalScrollDisabled = true). Could this be another?
[import]uid: 110703 topic_id: 36717 reply_id: 336717[/import]