Well I can change my code and add an Exit button or something, I'll figure out some way to work around this.
Thanks for all your help.
I have @ui.in.background before the line that takes the picture with the built-in camera. So that code looks like this:
if len(pics) == 4:
pic = photos.capture_image()
pics[len(pics):] = [pic]
So in my ui, I have a button with an action set to button_camera.
I'm sure I'm missing something obvious.
I added os.exit(EX_OK) after the v.present() line in my code, and when I run my app, Pythonista exists right away.
v = ui.load_view('umswi')
If I remove the os._exit(EX_OK), my app runs until I press the "X" in the upper left-hand corner. If I put the os._exit(EX_OK) back in, my app starts and immediately exits.
If a user presses "X" in the upper left-hand corner, I want Pythonista to close. But I don't want it to close until someone presses that "X".
What am I doing wrong?
I have my Phythonista app now. It is a simple app that allows a user to enter a ticket #, a brief message, and take up to four pictures. Once they click "SEND," it is all E-Mailed to an address. This is for a loading dock, so they can take pics of damaged loads.
So a couple of questions: (1) can I prevent users from accidentally changing the app? I don't care if they can see the source, just don't want them accidentally making changes to the point where it doesn't work.
(2) I've backed-up my .py file via E-Mail, is there a way to backup the .pyui file as well?
(3) I added an icon to the home screen but noticed that if I hit the Home button and tap the icon a dozen times, then go into Pythonista, I have a dozen instances of the app running. I can keep pressing X in the upper left-hand corner. Any way to prevent this?
Sorry for all the newbie question. I downloaded the Pythonista app on Friday and had my application running this evening. Very nice development system.