My horizontal-picker-like widget breaks in public release

I have created a horizontal-picker-like widget using scrollView. Everything works like expected in Corona sdk 2014.2171 and earlier. Unfortunately in later than 2014.2171, it breaks. I guessed it’s because of change in widget from 2014.2174. Here is the idea:

  • I added the “function scrollView:enterFrame( event )” to scale the object inside scrollView when scrilling

  • “Runtime:addEventListener( “enterFrame”, checkStopped )” as a snapBack function when the scrolling is stopped. and “scrollView:scrollToPosition()” do the trick.

My snapBack function, basically scrollView:scrollToPosition(), doesn’t work for my case in corona version later than 2014.2171. Please anyone have any idea or workaround.

For CoronaLabs, i can’t update to latest corona because of this; however, i can live with it before. But due to changes with IOS and App Store, i can no longer upload my app to App Store. I must use Public Release to build my app and upload to App Store. This is one of main features in my app. Please help!

I attached my codes for your review.

Finally, figure it out. The problem is in line 107 in main (scrollView:insert(newButton[i])). I can’t add objects again to scrollView in this case because it will reset position of the scrollView to its original (0,0 in my case). Again, this problem never happened in build 2014.2171 or older, which means later build has something to do with it. I never had any idea how “scrollView:insert()” works until now.

It’s so simple but gives me hard time to figure it our! Hope this may help others.

Finally, figure it out. The problem is in line 107 in main (scrollView:insert(newButton[i])). I can’t add objects again to scrollView in this case because it will reset position of the scrollView to its original (0,0 in my case). Again, this problem never happened in build 2014.2171 or older, which means later build has something to do with it. I never had any idea how “scrollView:insert()” works until now.

It’s so simple but gives me hard time to figure it our! Hope this may help others.