xcode run vs open... no difference

Hey there… coming from an AppleScript App where I had:

on run
	display dialog "This is a droplet... do not launch!" buttons {"Sorry"} default button 1
end run

on open (theItems)
-- this is where the good stuff happens
end open

… and it worked well. If I double-clicked the app I got the error, if I dropped something on the app icon, the script ran properly.

Trouble is, I can’t seem to duplicate this functionality now that I’m trying to wrap the script in Xcode. I started with AppleScript Droplet template in Xcode, and in Interface Builder I’ve activated “Launched” and “Open” for the File’s Owner"… Any thoughts?

The default script that you get when making the project is:


on idle
	(* Add any idle time processing here. *)
end idle

on open names
	(* Add your script to process the names here. *)
	
	-- Remove the following line if you want the application to stay open.
	quit
end open

So using the code you presented isn’t going to work, that is syntax for a “regular” drop-script.