?: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]
scrollView:scrollToPosition
{
x = currentBrandScrollPosition,
y = 0,
time = 500,
onComplete = scrollTobrandComplete,
}
Please take note that ALL of you older code that uses this widget will need to be changed. There might be other changes too, so of course, read the latest API docs. [import]uid: 110703 topic_id: 36717 reply_id: 145014[/import]
scrollView:scrollToPosition
{
x = currentBrandScrollPosition,
y = 0,
time = 500,
onComplete = scrollTobrandComplete,
}
Please take note that ALL of you older code that uses this widget will need to be changed. There might be other changes too, so of course, read the latest API docs. [import]uid: 110703 topic_id: 36717 reply_id: 145014[/import]
scrollView:scrollToPosition
{
x = currentBrandScrollPosition,
y = 0,
time = 500,
onComplete = scrollTobrandComplete,
}
Please take note that ALL of you older code that uses this widget will need to be changed. There might be other changes too, so of course, read the latest API docs. [import]uid: 110703 topic_id: 36717 reply_id: 145014[/import]
scrollView:scrollToPosition
{
x = currentBrandScrollPosition,
y = 0,
time = 500,
onComplete = scrollTobrandComplete,
}
Please take note that ALL of you older code that uses this widget will need to be changed. There might be other changes too, so of course, read the latest API docs. [import]uid: 110703 topic_id: 36717 reply_id: 145014[/import]
Nick, things like this were done to simplify both the usage and the internal code. Widget 2.0 isn’t widget 1.0, so I find the “screw up everyones code” comment unfair. There is a migration guide that explains all of these changes.
Nick, things like this were done to simplify both the usage and the internal code. Widget 2.0 isn’t widget 1.0, so I find the “screw up everyones code” comment unfair. There is a migration guide that explains all of these changes.