Re: How to reliably target a helper app that's inside a bundle?
Re: How to reliably target a helper app that's inside a bundle?
- Subject: Re: How to reliably target a helper app that's inside a bundle?
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 19 Oct 2009 15:18:32 -0700
- Thread-topic: How to reliably target a helper app that's inside a bundle?
>My main application bundles an AppleScript script and scriptable helper
application.
> My worry with doing this is that this still won't help osacompile find
"HelperApp" during script compilation. How can I be sure that my script will
always compile to the most current HelperApp's scripting definition? Is there
a better way to approach this?
This is quite possibly a non-issue. The script does not need to compile at
runtime and as long as the script can find the helperApp you should be fine
with "using terms." ("Using terms" helps compile during script editing)
Unless you see a scenario where you would release an update to the helperApp
without updating the bundled script at the same time, you should be fine.
Even if the helperApp were updated; and its scripting definition changed;
and the script not updated, there still wouldn't be a 'runtime compile
error' but there could be a 'runtime execution error'.
>>>I could get the path of my HelperApp by either passing it as an argument to
the script, or using "path to me". (Is the latter reliable? I know in many
contexts relying on the executable path is strongly discouraged.)
"Path to me" is probably the most reliable way to get the path to your
helper app at runtime.
>>>global theHelperApp
It may not be a good idea to use globals in this kind of script. Once the
script has finished it will try to store the value of the global and if it's
distributed on a read-only medium you may give your users unwanted error
messages. Might be better to pass the value in a local.
HTH,
ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden