scrolling on the iphone

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

scrolling on the iphone

Post by fre » Thu Apr 21, 2011 1:31 pm

hallo,

i searched for a script to scroll a field and i found this post:
http://forums.runrev.com/phpBB2/viewtop ... oll+bounce

i used the code that is in the attached file: lcMobileScroll_0.0.3.livecode.zip

in the simulator everything works fine. but on the iphone the scrolling is not really fluently and it is slow. the effect is not really good. i have seen other apps where the scrolling was much better. is there any other solution for scrolling ?

thank you for any help !

regards
fred.

hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am
Contact:

Re: scrolling on the iphone

Post by hliljegren » Thu Apr 21, 2011 2:15 pm

As long as you can use a text field you could scroll by using a scrollview. You can also do some formatting in the text field. But if you have an "advanced" layout in your list, my only resort was to use the browser and build an html page and feed that to the browser.
___________________________________
MacBook Pro M1 MAX 64 Gb,
LiveCode 10.0.1rc3

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: scrolling on the iphone

Post by bn » Thu Apr 21, 2011 2:35 pm

Hi Fred,

that stack is an older version but should scroll fine. Please look at this one:

http://forums.runrev.com/phpBB2/viewtop ... =49&t=6876

as an example.

should work fine also. It does for me even on my iPhone 3G running iOS 4.2 it is acceptable.

Did you just use the sample on your iPhone/iPod which version? Is the sample stack slow or did you put it into your own project? Do you use any graphic effects? These slow down things considerably.

Kind regards

Bernd

fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

Re: scrolling on the iphone

Post by fre » Thu Apr 28, 2011 1:11 pm

hallo bernd,

thank you for the link to the newer version, the scrolling is ok now !

there is one thing left i would like to change. the response time of the choice that one makes is about 1 second. that is too long. if i make a choice my finger has to be for one second on the choosen item. a fast fingertip is not enough. do i have control about that?

best
fred.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: scrolling on the iphone

Post by bn » Thu Apr 28, 2011 1:32 pm

Hi Fred,
the response time of the choice that one makes is about 1 second. that is too long. if i make a choice my finger has to be for one second on the choosen item.
This is not my experience. The response and the visual effect going to the next card is just as in all other apps on my iPhone 3G. It is almost instantaneous. Was this on an unchanged version of the scroller example?

Did you by any chance change this line of code?

Code: Select all

 iphoneControlSet sScrollerId, "delayTouches", false
if you change the "delayTouches" to true then it can take some time.

Kind regards

Bernd

fre
Posts: 41
Joined: Fri Nov 12, 2010 7:22 pm

Re: scrolling on the iphone

Post by fre » Fri Apr 29, 2011 6:28 am

bernd, i put the code of the example in my own project. so it is not an unchanged version of your scroller example.

i commented out the following lines and the response time is now good:

Code: Select all

...
if(tlsAClick) then 
  // lock srceen
  put tTestForEmpty into myVariable
  go card "mycard" of this stack
  // unlock screen with visual effect push left very fast
end if
...
you see i do not use the lock srceen and the visual effect. but i do not know why this problem does not appear in your example. the reason has to be somewhere in my project.

best
fred.

Post Reply