Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
- Subject: Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
- From: Shane Stanley <email@hidden>
- Date: Sat, 24 Jan 2015 11:40:49 +1100
On 24 Jan 2015, at 6:25 am, Jerry Krinock <email@hidden> wrote:
>
> NSString* source ;
> source = [NSString stringWithFormat:
> @"tell application \"%@\"\n"
> @"activate\n"
> @"present last logged error\n"
> @"end tell",
> [[NSBundle mainAppBundle] bundlePath]
> ] ;
>
> where [[NSBundle mainAppBundle] bundlePath] returns “com.mycompany.MyApp”.
In that case, you should be using @"tell application id \"%@\"\n". (Oh, and "activate" seems to have become asynchronous these days.)
> MyApp indeed has a 'present last logged error’ AppleScript command defined, and it works.
What does it do -- does it call OSACOerceFromDesc() by any chance? Do you know what code was running when the errors were generated?
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden