I have been testing new build 2021.3647 and seem to be having issues with the widget library on Android. On the main menu of my app, I display a standard scrollview. As soon as the scrollview is displayed, I receive this error:
?:0. attempt to index 'topFrame' (a nil value)
I do not have a variable name of “topFrame” in my app and the only reference I can find with that name is the scrollview widget.
My scrollView code:
gamesScrollView = widget.newScrollView(
{
top = _myG.headerBottom,
left = 0,
width = _myG.actualScreenWidth,
height = _myG.actualScreenHeight,
scrollWidth = _myG.actualScreenWidth,
scrollHeight = 2000,
hideBackground = true,
isBounceEnabled = true,
friction = 1,
horizontalScrollDisabled = true,
listener = scrollListener,
topPadding = -_myG.headerBottom,
bottomPadding = _myG.grassY + 35
})
Also, I am using the newSwitch widget to allow the user to turn sounds on/off in my app. When that switch is displayed, I receive this error:
bad argument #2 to 'newSprite(ImageSheet expected, got nil)
My switch code:
local soundSwitch = widget.newSwitch( { x = (display.contentWidth * .5) + 100, y = startSettingsY, style = "onOff", id = "soundSwitch", initialSwitchState = _myG.soundOn, onRelease = soundSwitchRelease } )
I do not receive either of these errors when I build with 2021.3646, only with 2021.3647. I am using Android 11 on a Moto G Stylus. I have also verified that this behavior is the same on a Samsung Galaxy Tab running Android 7.1.1. These issues do not seem to occur on IOS nor the simulator.
Thanks for all the hard work and any assistance is greatly appreciated!
Thanks,
Scott