• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS


  • Subject: Re: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS
  • From: Matt Neuburg <email@hidden>
  • Date: Sat, 05 Jul 2008 16:53:27 -0700
  • Thread-topic: NSAppleScript - compileAndReturnError always breaks with EXC_BAD_ACCESS

On Sun, 6 Jul 2008 00:44:19 +0200, Alex Wied <email@hidden> 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@hidden, <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 (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

  • Prev by Date: Re: Capture Window/View created through NSTask
  • Next by Date: Re: garbage collection and NSConnection
  • Previous by thread: Re: NSURLConnection how to handle 502 error
  • Next by thread: Key equivalents for an action without a visible object item
  • Index(es):
    • Date
    • Thread