Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
- Subject: Re: Inexplicable Crash in -[NSAppleScript executeAndReturnError:]
- From: Steve Mills <email@hidden>
- Date: Fri, 23 Jan 2015 19:17:56 -0600
On Jan 23, 2015, at 18:40, Shane Stanley <email@hidden> wrote:
>> 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.)
Oh, that reminds me. I had to change it to mainBundle instead of mainAppBundle.
Steve via iPad
_______________________________________________
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