Re: AppleScript Build Phase and osacompile - problem with deployed scripts for users
Re: AppleScript Build Phase and osacompile - problem with deployed scripts for users
- Subject: Re: AppleScript Build Phase and osacompile - problem with deployed scripts for users
- From: Simon Liu <email@hidden>
- Date: Wed, 29 Sep 2004 10:13:32 +0100
Hi Matt,
I see what you mean... Just from reading the docs, I thought that
Xcode 1.5 had support for compiling .applescripts. Before, one would
have to create a custom shell script phase, or set up a build 'rule'
when processing .applescript files. Xcode 1.5 was supposed to change
that. Perhaps I read it wrong.
Anyway, slightly OT, but since I have your attention(!) - I have your
book on AppleScript and have read the section on resolving/finding
dictionaries at run-time. A small number of my users have problems
where iCal launches my script (in response to a calendar alarm), where
my script is based on my application's dictionary, but the script
cannot find my application. It either fails with error messages like
'cannot find class ... of application ... ' or it asks the user to
locate my application. Is there anyway that I can set up the user's
system so that it automatically knows where the application is? At
the moment I tell users to open Script Editor, and open the dictionary
for my application. After that, things seem to work. Is there some
kind of cache or desktop database that can be rebuilt?
Cheers
Simon
On Tue, 28 Sep 2004 14:21:36 -0700, Matt Neuburg <email@hidden> wrote:
>
>
> On Mon, 27 Sep 2004 13:04:31 +0100, Simon Liu <email@hidden> said:
> >Hi,
> >
> >In the detailed build results, for an AppleScript build phase, XCode
> >1.5 invokes osacompile with two undocumented options:
> >
> >-i /System/Library/Frameworks/AppleScriptKit.framework
> >-U MYSCRIPT.scpt
> >
> >Before the AppleScript build phase was introduced in XCode 1.5, I used
> >to have a Shell Script build phase where I would invoke osacompile
> >myself, but without these two options. There were never any problems
> >reported by users.
> >
> >Now however, my OSX 10.3.5 users have reported problems with scripts
> >breaking while trying to display a dialog. Here is an example which
> >breaks:
> >
> >tell me
> > display dialog "hello"
> >end tell
> >
> >The error message is: hello doesn't understand the <<event panSdlog>> message
> >
> >Does anybody have updated documentation for osacompile on what the -i
> >and -U options do, and why they might cause scripts to compile, run,
> >but break on certain events?
>
> An AppleScript build phase is for an AppleScript Studio app. Therefore
> osacompile is invoked using the ASK dictionary (the dictionary effectively
> built into every AppleScript Studio app). But your app, I have to assume, is
> *not* an AppleScript Studio app; you are not adding the ASK framework to it.
> Therefore it does not know how to execute AppleScript Studio's version of
> the "display dialog" command. You presumably want the StandardAdditions osax
> version of that command, but that's not what's winding up in the compiled
> bytecode.
>
> The solution is presumably to go back to doing it the way you were doing it
> before. m.
>
> --
> matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
> A fool + a tool + an autorelease pool = cool!
> AppleScript: the Definitive Guide
> <http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden