Hi Steve,
Well, this may turn out to be a little more messy than I expected -- but maybe I'm going about things wrong.
In a nutshell, if, after I've saved a script as an application bundle, I decide the script needs editing, I've been accessing the script via "Show Package Contents" -- and that appears to be where the trouble starts. The script, retrieved in that manner, has the added information in the path. If I try to evaluate my editing by running that script, it crashes on the path. If I add a routine to correct the path, the script will run from that window but the routine then gets saved back to the app, which may crash because of the routine (which it doesn't need).
To make matters really confusing, AppleScript Editor and Script Debugger (which I've been using recently) act somewhat differently. Here are details of what happens with both editors:
In AppleScript Editor:
Write Script & compile
Save to desktop as application bundle "SH.app" (title of AS window remaining on desktop changes to SH.app)
Run from window remaining on desktop with resulting dialog:
"Path: "MAC HD:Applications:AppleScript:Script
Editor.app:Contents:Resources:ASA"
>> Incorrect path if run from this window <<
<div class="jive-quote">Close remaining window
Double-click on desktop app with resulting dialog:
"Path: "MAC
HD:Users:osimp:Desktop:SH.app:Contents:Resourc
es:ASA"
>> Which is the correct path <<
<div class="jive-quote">Control-click on desktop app and choose Show Package Contents, navigate to main.scpt and open that (title will be "main.scpt")
Run script from that window with resulting dialog:
"Path: "MAC HD:Applications:AppleScript:Script
Editor.app:Contents:Resources:ASA"
>> Incorrect path if run from this window <<
In Script Debugger:
The corresponding three dialogs are:
"Path: "MAC
HD:Users:osimp:Desktop:SH.app:Contents:Resourc
es:ASA"
>> Which is the correct path <<
"Path: "MAC
HD:Users:osimp:Desktop:SH.app:Contents:Resourc
es:ASA"
>> Again, the correct path <<
"Path: "MAC
HD:Users:osimp:Desktop:SH.app:Contents:Resourc
es:Scripts:main.scpt:Contents:Resources:ASA"
>> Incorrect path if run from this window <<
I haven't really had time to think this out in terms of the best way to edit (and test) a script already saved as an application bundle.