Page 1 of 1
Button do not navigate
Posted: Fri Sep 13, 2013 8:33 am
by genie
Hello!
I have this weird problem.... my buttons do not go to another card when tapped. Works perfectly on iOS. Problem only exist when deployed to Android.
Button script:
Code: Select all
on mouseUp
answer "tapped"
go to card "About"
end mouseUp
I know that button is tapped because the toast message appears. But it stops there.
I know that it never got into card "About" because the toast inside preOpenCard never appears.
Card "About" script:
Code: Select all
on preOpenCard
answer "on card about"
pass preOpenCard
end preOpenCard
Problem sounds silly, but I am hoping somebody else experienced this too. Anyone?
Will really appreciate any feedback.
Thanks,
Genie
Re: Button do not navigate
Posted: Fri Sep 13, 2013 1:48 pm
by AndyP
Hi Genie,
Try with on OpenCard instead of on preOpenCard.
With on preOpenCard the card and all objects associated with it are not visible so you will not see the Answer dialogue.
on OpenCard
answer "on card about"
pass OpenCard
end OpenCard
Re: Button do not navigate
Posted: Sat Sep 14, 2013 12:01 am
by genie
Thanks Andy!
I tried, but still didn't work.
Also, the UI really didn't go to card "About". Stays on the same screen.

Re: Button do not navigate
Posted: Mon Sep 07, 2015 11:23 pm
by athelene
I'm having the same problem described above. Any further suggestions on how to troubleshoot? My situation is that I have a button with the following code. When it's clicked on, nothing happens.
on mouseUp
go to card "cardEditCategories"
end mouseUp
Athelene
Re: Button do not navigate
Posted: Mon Sep 07, 2015 11:45 pm
by dave.kilroy
hi Athlene & Genie - here is my list of irritating questions, maybe one of them will remind you of something that will lead you to the solution - got any frontscripts in your stacks? Or behaviors with 'before' handlers? what version of LiveCode are you using? what Android SDK are you applying? could it be a bug in LiveCode? do you get the same results with emulator as on real devices? what happens if you have another button that sends a 'mouseup' message to the problem button? if you create a new button with the same script does this work? if you create a 'hello world' app for android does this also have wonky buttons?
And finally, Athlene what happens if you make the button a bit bigger for your Android builds?
Re: Button do not navigate
Posted: Mon Sep 07, 2015 11:49 pm
by Dixie
Mmm... strange, but maybe this might help... this allows the card to finish opening before you get it to do anything else
Code: Select all
on openCard
send "goAbout" to this card in 20 millisecs
end openCard
on goAbout
go card "about"
end goAbout
Re: Button do not navigate
Posted: Wed Sep 09, 2015 9:39 pm
by athelene
Dave, thank you for the reply. To start, I haven't even tried in an emulator yet. It's not working in the IDE. Building as a standalone, not Android (yet.) I have some onLoad handlers for the two cards in the app (pretty simple app so far!) Using LiveCode 7.0.6 build 10038. I will try to create another button to test. I'll report back once I get a chance to do so. Thanks again for the troubleshooting ideas.
Re: Button do not navigate
Posted: Wed Sep 09, 2015 9:57 pm
by Simon
Hi Genie,
Is that "answer "tapped"" in the script while running on an Android?
That may through it off, try running it without the "answer".
Simon
Re: Button do not navigate
Posted: Thu Sep 10, 2015 5:40 pm
by sturgis
Are you sure you have a card named "about?"
Right after you try to go to the card, put this..
answer the result
If there is a problem when you try to go to the card it will appear in "the result" for example, if I try to go to a card that doesn't exist, the result contains "No such card". Hopefully if there is something wonky going on, you'll be able to figure it out using the result.