No User Interaction Allowed

I have the following line of code in 2 place in my application:

quit application “MyApp”

It used to work perfectly, but after adding a few things elsewhere I get the “No User Interaction Allowed” error on these lines. Unfortunately, the undo button leaves my code a mess when I try to go back more than a few steps, and I don’t have a backup copy of the scripts. I tried cutting everything back to where it was working, but it still fails.

Any idea why this error would be showing up? What does it even mean?

THANKS!


Now freaking out…

I tried deleting the build files and then building from scratch. That gives me 221 errors, in strange places that I have nothing to do with (OSByteOrder.h, byte_order.h, stdint.h, etc)

Also, for a while when I opened my file it would ask “Were is MyApp?” and require me to select it from a list. I’m really confused, and afraid that a month of work on this thing is gonna be lost. Anyone out there who can save my project?

I’ve seen that before, too…and can’t remember exactly what was causing it. Try using one of these instead…

tell application "MyApp"
	quit
end tell
-- OR --
tell application "MyApp" to quit

You could be getting a conflict if this is within in another tell statement which does not receognize the command. If this doesn’t help, you’ll have to give more code. It’s not always the code you’re hung up on that’s necessarily the problem, but rather code before or surrounding it that’s causing the grief.

EDIT >>
Sometimes, under certain circumstances you may have to reference the app not by it’s name, but by it’s path. I have this problem with my current project, and I used something like the following…

set myApp to "Macintosh HD:Applications:MyApp.app"
try
	tell application myApp
		activate
	end tell
end try

I’m still far fom the end of development on this one, and have not arrived at figuring out why this is yet. I’ll let you know if I find a better way.

j

Thanks for the advice. I tried the first suggestion in my script. It worked fine in some places, but still gave me the same error in others. Perhaps the scope of other tell statements was messing with things.

Anyway, I found that using


tell my application "MyApp" to quit

solved this problem. I no longer get the error.

My concern now is with the “freaking out” seciton above. I had to replace the trashed build directory to get anything to compile. That’s well and good for now, but it concerns me that a clean build of my app completely fails to run at all. Still looking for help there. THANKS!

OK. These 221 errors I get when main.m is compiled are really annoying…not to mention my old build files are now gone, so I can’t even test my app at all.

I tried creating a brand new Applescript Studio Application. Supposedly, building an “empty” app will actually give you a nice little blank window that can move/scale/close. What did I get? Exactly the same 221 errors in main.m. YAY.

So if a brand new app is having the same problem, then most likely my script is still ok. That makes me happy, but it still doesn’t solve the problem. In fact, it’s worse, since I can’t even start from scratch if I wanted too…since “scratch” is already broken.

HELP! (THANKS!)

EDIT-----------------------------

Of interest, the first error is:

types.h:30: ppc/types.h: No such file or directory

I imagine that this MIGHT be the cause of the remaining errors, but I can’t be sure.
Should I just try a reinstall of Developer Tools? Thanks again.

Has anyone had any luck with the 1.5 release of Developer Tools? I tried to reinstall the latest version with hopes that it would solve my problems. When I run the installer, it takes about 6 hours to get through the “preparing target disk” phase. I haven’t even made it through the “writing files” phase yet…and that was after about 12 hours.

Furthermore, whenever I run the installer (even after a clean restart) it locks up the machine completely. It continues to run, slowly, but attempting to move windows around the screen, open other applications, use expose…all fail. It’s just stuck.

Any ideas what’s wrong here? Have others successfully installed DT 1.5?

It sounds to me like your problems run deeper than Xcode itself. Been fishing around in any forbidden system water-holes? :wink:

I’ve been running 1.5 for over a week without a single conflict. It did take a while to install, but not 6 or 12 hours, so you may have some bigtime memory or HD corruption problems. I wouldn’t reformat your HD just yet, but you may want to run a disk utility and make sure things are OK at that level before you asume it’s xcode or your projects.

Sorry to hear about your problems, and wish I had some answers for you. :cry:

Good luck,
j