Strange behavior with "go card"

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Strange behavior with "go card"

Post by JosepM »

Hi,

I have a button with the following code. I detected that the response time from the user touch the button until the card move from one to another is very high.

Any tip for a fast response? I still waiting more than 1 second... :(

Code: Select all

on mouseUp
   visual effect push left very fast
   go card "menu"
end mouseUp

Salut,
Josep
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Strange behavior with "go card"

Post by andyh1234 »

I found quite often mouserelease is being called instead of mouseup due to finger movement and that caused a delay, or the impression the button didnt do anything when clicked.

Adding

on mouserelease
send mouseup to me
end mouserelease

in the parent stack made things infinitely faster!
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Strange behavior with "go card"

Post by Dixie »

Hi...

Have you got lots of things going on in a preOpenCard or openCard handler of the card you are 'going' to ?

be well

Dixie
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Strange behavior with "go card"

Post by JosepM »

Not much, some put xxx into fld YYY and with lock and unlock screen... in others I haven't code any.

I will try the mouserelease tip, in some cases I need touch two times to activate it, and when is activated have a slow response.

Salut,
Josep
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Strange behavior with "go card"

Post by Dixie »

Hi...

You mentioning that sometimes you have to 'touch' twice made me think that it might be worth trying to issue an iphoneClearTouches command in 'mouseDown' prior to your 'mouseUp'... it's worth a try.

be well

Dixie
andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Re: Strange behavior with "go card"

Post by andyh1234 »

Just a thought, are you using a device or simulator???? They can behave quite differently.

Another option instead of lock screen is..

set the lockmoves to true

That way, the screen is not locked, but all the moves only happen together at the end of the function rather than individually.

No idea one is better than the other (or even it if will help you), but it seems to help in some cases with a slightly better user experience when lock screen can sometimes give a definite effect of a stall followed by something happening fast.
JosepM
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 344
Joined: Tue Jul 20, 2010 12:40 pm

Re: Strange behavior with "go card"

Post by JosepM »

I'm using a device.

I will try lockmoves to true...


Salut,
Josep
Post Reply