Page 1 of 1
Lagging Scroller
Posted: Mon Apr 01, 2013 12:50 am
by Jarren
Hello everyone, I might be a new face on the forum, but I've been using LiveCode for over a year now, and have successfully published my first app back in September. I've also been silently lurking these forums now and again to glean new information.
I've been working on a sort of version 2 of my current app, re-hauling the interface and trying to make optimization to the code to slim things down and support more device resolutions. I'm running into issues with the native iOS scroller. I have roughly 20 objects inside of the scroller, primarily being graphic rectangles, and a couple of images. In the iOS simulator, the scrolling is smooth, but as soon as I deploy it to my iPhone 4, it becomes extremely slow and laggy. This is odd, because my previous app had a scroller containing over 150 images, and it scrolls very smoothly.
I have all the settings correct, Accelerated rendering set to true, every layer mode is set to scrolling. I am not using any graphic effects on the graphics.
If someone could take a look at it, it would be greatly appreciated. Who knows, maybe I'm just missing something small, another set of eyes is always useful. Just look in the "Score" card script for the scroller handlers.
- Demo.zip
- (24.68 KiB) Downloaded 348 times
Thanks,
Jarren
Re: Lagging Scroller
Posted: Mon Apr 01, 2013 9:09 am
by endernafi
Hi Jarren,
every layer mode is set to scrolling.
That's the problem.
LiveCode works in a different way regarding the layer modes.
Only the layer mode of the topmost control is valid.
I mean, the owner of that particular object {group, image, etc.}
whose layer mode is set to "scrolling" must be the card itself.
Try this:
* Set the layer mode of every each control to
static.
* Then, set the layer mode of group "ScrollingGroup" to
scrolling.
That should do it.
I applied these changes to your stack and it scrolls smoothly in an old iPod Touch
You can check this
link, additionally.
It's a very nice looking app, btw, congrats...
Best,
~ Ender Nafi
Re: Lagging Scroller
Posted: Mon Apr 01, 2013 2:17 pm
by Jarren
Thank you Ender! I had no idea! I was racking my brain trying to figure out what was wrong. I will definitely update it with the changes you suggested.
Thanks for the compliment on the look of the app, my first passion has been graphic design, next to coding.
Jarren
Re: Lagging Scroller
Posted: Mon Apr 01, 2013 2:23 pm
by endernafi
Glad that it helped.
I'd like to grab a copy of the final version of your app.
When you publish it, could you post the itunes store link here?
Thanks,
~ Ender Nafi
Re: Lagging Scroller
Posted: Mon Apr 01, 2013 2:41 pm
by Jarren
endernafi wrote:Glad that it helped.
I'd like to grab a copy of the final version of your app.
When you publish it, could you post the itunes store link here?
Thanks,
~ Ender Nafi
Sure thing, its for a very niche market that would have no use for you specifically, unless of course you were a 9-14 year old boy or girl who competes in First Lego League. (Google it to find out what exactly it is, and you might understand, for some reason I'm not allowed to link outside the forum)
Re: Lagging Scroller
Posted: Mon Apr 01, 2013 2:48 pm
by endernafi
for some reason I'm not allowed to link outside the forum
It's about the post count.
Only after a certain amount of post {posts to this forum} one can give outer links.
~ Ender Nafi
Re: Lagging Scroller
Posted: Tue Apr 02, 2013 1:34 am
by Jarren
Finally got the time to do it tonight! Thanks a bunch! Scrolls like molten butter! (for a lack of a better way to describe it

)
Re: Lagging Scroller
Posted: Mon May 06, 2013 8:40 pm
by jstarkman
Hi Jarren,
My app has a series of buttons & fields that are organized in a scrollgroup as well. I understand how to make them scroll, but your reference to 'molten butter' caught my eye.
My form contains perhaps 60 to 70 objects, and although they are set up properly, they don't scroll in a 'zippy' manner, but more like 'molten mollasses'. The scolling is smooth, but lags behind the touch location a bit. Is that what you're seeing in your app as well?
Joel
Re: Lagging Scroller
Posted: Fri May 10, 2013 4:39 am
by Jarren
jstarkman wrote:Hi Jarren,
My app has a series of buttons & fields that are organized in a scrollgroup as well. I understand how to make them scroll, but your reference to 'molten butter' caught my eye.
My form contains perhaps 60 to 70 objects, and although they are set up properly, they don't scroll in a 'zippy' manner, but more like 'molten mollasses'. The scolling is smooth, but lags behind the touch location a bit. Is that what you're seeing in your app as well?
Joel
I have 86 items in my scroller. All of them are either shapes or fields, with the exception of 7 small images. On the iPhone 4 it scrolls very smoothly, and I can whip my finger up and down as fast as possible and the scroller is stuck to the original position I touched at. Not sure whats going on with your scroller then....