On Sun, 6 Jul 2008 00:44:19 +0200, Alex Wied <[EMAIL PROTECTED]> said:
>Greetings,
>
>I have a trivial AppleScript that I would like to compile and run
>under Objective-C. When I try to compile or execute it via
>compileAndReturnError or executeAndReturnError I'm permanetly
>receiving a EXC_BAD_ACCESS.
>
>Here's my code:
>
>======= CODE START ===
>- (IBAction) simpleScript:(id)sender
>{
> NSAppleScript* theScript = [[NSAppleScript alloc] initWithSource:
>@"beep 3"];
> if (theScript != NULL)
> {
>  NSDictionary* errDict = NULL;
>  // execution of the following line ends with EXC
>  if (YES == [theScript compileAndReturnError: &errDict])
>  {
>   NSLog(@"compiled the script");
>   [theScript executeAndReturnError: &errDict];
>  }
>  [theScript release];
> }
>}
>======= CODE END ===

This probably won't help much, but I copied and pasted your code into Xcode
and it ran fine on every machine I've got... However, I don't have the
version of Xcode that you have which we're not allowed to mention. m.

-- 
matt neuburg, phd = [EMAIL PROTECTED], <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
One of the 2007 MacTech Top 25: <http://tinyurl.com/2rh4pf>
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>



_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to