Ive had a few problems in the past where my touch commands in codea were affected by the ipad’s side panel and multi gesture commands, to overcome these ive had to write pretty hacky code to make it go away.
For example, sometimes the touchIDs get stuck when you accidentily use multi gesture to swipe across to a different app then back, codea app will be tricked into thinking that one of your fingers are still touching the ipad, leading to the app malfunctioning.
Another example: bringing up the native ipad side panel will turn your FULLSCREEN_NO_BUTTONS to FULLSCREEN.
Is there a standard that people use to make sure their app doesnt do this?
Good question, I have this issue with my Working Copy WebDAV client, where app-switching with
OpenURL brings the buttons back. What I did (a bit hacky) is just to have fairly regular calls of
displayMode(FULLSCREEN_NO_BUTTONS). I have it fire on touched began, but maybe having it go every few seconds in the draw loop might be better. Just make sure you do add a quit button.
With stray touched events, are you checking for CANCELED as well as ENDED?
The side panels turning FULLSCREEN_NO_BUTTONS into just FULLSCREEN is actually a feature, it’s a way to return to the editor without force-closing Codea if you don’t have a button to run the close() function, I’m pretty sure it’s disabled when you export your project.
@yojimbo2000 CANCELLED used to catch everything, but it became kind of unreliable after a new iOS version (might have been 8, can’t remember). I still get touches stuck occasionally, even with a catch for CANCELLED (though it does work sometimes, so you should have it implemented).
Touches interrupted at the OS level should be delivered as CANCELLED. Though it may be a bug in Codea if touches are occasionally not receiving the CANCELLED state.
Yep i periodically call for FULLSCREEN_NO_BUTTONS, usually when my data gets exported out, however it only happens every 20 seconds so there is always one or two people who bring up this issue with me. The reason I am forced to do this is because my app is not ready to go to appstore yet due to inability to export data to google appstore (long story - need to learn some more https), so I am currently getting all my helpers to load the app straight from codea to collect data. Its a bit unprofessional but its the best I can do atm.
I didnt know about CANCELED - will use that now.