Re: Using AppleScript Scripts in Cocoa Applications - TN2084 error or just me?
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: Sun, 27 Apr 2008 22:57:33 +0200
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