• 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: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?


  • Subject: Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
  • From: Jean-Daniel Dupas <email@hidden>
  • Date: Sun, 27 Apr 2008 20:59:33 +0200


Le 27 avr. 08 à 20:27, Mohsan Khan a écrit :

Hi,

I'm trying to call an AppleScript from my Cocoa application, I've copied the code from http://developer.apple.com/technotes/tn2006/tn2084.html but my application will crash once called.

I did change the script to:
NSAppleScript* scriptObject = [[NSAppleScript alloc] initWithSource: @"beep"];


Calling this line will crash my app:
returnDescriptor = [scriptObject executeAndReturnError: &errorDict];

Did I miss something, because I have no idea what the console messages mean?


Console messages:
"Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/ Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/ Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/ Adobe Unit Types: no matching architecture in universal wrapper
MyApp: OpenScripting.framework - scripting addition /Library/ ScriptingAdditions/Adobe Unit Types.osax declares no loadable handlers.
2008-04-27 20:17:15.095 MyApp[7531:10b] Error loading /Library/ ScriptingAdditions/FITS.osax/Contents/MacOS/FITS: dlopen(/Library/ ScriptingAdditions/FITS.osax/Contents/MacOS/FITS, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/FITS.osax/Contents/MacOS/FITS: no matching architecture in universal wrapper
MyApp: OpenScripting.framework - scripting addition /Library/ ScriptingAdditions/FITS.osax declares no loadable handlers."

The error mean that you have an invalid osax (Scripting addition plugins) installed. When you load or compile an AppleScript, the scripting machinery loads all installed scripting additions (installed in /Library/ScriptingAdditions/, and in /System/Library/ ScriptingAdditions/ and <user home>/Library/ScriptingAdditions/)


This message just says that the "Adobe Unit Types" and the "FITS" additions are not valid for your computer. But that should not crash your app. What do you mean by "crash my app" ? Is it just logging messages or something else ?

Note: I bet this script is just for testing purpose, else you can use NSBeep() to do get the same result without Apple Script.


_______________________________________________

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


  • Follow-Ups:
    • Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
      • From: Mohsan Khan <email@hidden>
References: 
 >Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me? (From: Mohsan Khan <email@hidden>)

  • Prev by Date: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
  • Next by Date: Updating frameworks stored in subversion?
  • Previous by thread: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
  • Next by thread: Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
  • Index(es):
    • Date
    • Thread