backKey handled by a closed stack? [solved]

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Cairoo
Posts: 112
Joined: Wed Dec 05, 2012 5:54 pm

backKey handled by a closed stack? [solved]

Post by Cairoo » Wed Mar 06, 2013 5:49 pm

Dear experts

I don't know if it's normal or not, but here's what happens in my app on Android

When the user presses a certain button in main stack A, main stack B opens. So far so good. If the user presses the hardware back key in main stack B, main stack B handles backKey and in that handler main stack B is closed, which causes main stack A to appear again. So far so good. But now, If the user presses the hardware back key again, backKey is still handled by main stack B, even after main stack B has been closed! Main stack A also has a backKey handler. I need main stack A to take over the handling of backKey once main stack B has been closed.

Any advice would be immensely appreciated.

Thanks

Gerrie
Last edited by Cairoo on Wed Mar 06, 2013 6:15 pm, edited 1 time in total.

Cairoo
Posts: 112
Joined: Wed Dec 05, 2012 5:54 pm

Re: backKey handled by a closed stack?

Post by Cairoo » Wed Mar 06, 2013 6:14 pm

I have discovered the solution. I just had to set main stack B's destroyStack property to true before closing it. That was it!

Thanks for reading!

Post Reply