On Jan 23, 2015, at 13:25:58, Jerry Krinock <je...@ieee.org> wrote: > > Can anyone explain this weird crash report I got from a user and symbolized? > The last thing my code does (frame 24 in the call stack below), is to send > -[NSAppleScript executeAndReturnError:]. The crash says someone tried to set > a *dictionary* object with a nil key. How could I have done that? > > 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”. > MyApp indeed has a 'present last logged error’ AppleScript command defined, > and it works.
I can't find any docs for "present last logged error". How do I set up a state so that it will do something? I'm trying your code here and it executes fine, probably because there is no last logged error. I tried first sending an AppleScript that asked for document 1, which generated an error because there is no document. -- Steve Mills Drummer, Mac geek _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com