• 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: Mohsan Khan <email@hidden>
  • Date: Mon, 28 Apr 2008 18:40:52 +0200

I tried to run the code in my main method which worked well, but not in my AppController.m - does it matter?

Thanks.



On sö 27 apr 2008, at 22.57, Mohsan Khan wrote:

The debugger kicks in and stops at "#0 0x7fff80e73d50 in _objc_fixupMessageRef" in a long call stack.
Do I need do include something in my project, settings etc ?







On sö 27 apr 2008, at 20.59, Jean-Daniel Dupas wrote:


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
_______________________________________________

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: "Adam R. Maxwell" <email@hidden>
    • Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
      • From: "I. Savant" <email@hidden>
References: 
 >Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me? (From: Mohsan Khan <email@hidden>)
 >Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me? (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me? (From: Mohsan Khan <email@hidden>)

  • Prev by Date: Re: Zip Files in Objective-C?
  • Next by Date: flat_namespace?
  • Previous by thread: Re: 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