Problems making an app Apple-scriptable
Problems making an app Apple-scriptable
- Subject: Problems making an app Apple-scriptable
- From: Lindsey Spratt <email@hidden>
- Date: Thu, 30 Jan 2003 23:44:38 -0600
I'm pretty sure there's something really simple that I'm missing, but I
can't see it. I hope somebody can point out to me what I've done wrong
here.
I've been trying to make XGP (open source gprolog IDE for Mac OS X)
scriptable (on 10.2.3). I'm using ScriptEditor to try to "Open
Dictionary" of XGP, and it always fails.
What the Error Looks Like:
If I run XGP in the debugger, then I see the NSLog message (from
somewhere in the NSScript mechanism, I suppose):
2003-01-30 23:12:27.902 XGP[25056] No readable name in dictionary
This is immediately followed by EXC_BAD_ACCESS signal, with the
following stack:
#0 0x90131db8 in CFRetain
#1 0x90134700 in CFArrayCreate
#2 0x908bd3a0 in readableNameArray
#3 0x9088da60 in -[NSScriptClassDescription _readClass:]
#4 0x90892c04 in -[NSScriptSuiteRegistry
_readClassesInSuite:dataStream:]
#5 0x90892f00 in -[NSScriptSuiteRegistry _readSuites:dataStream:]
#6 0x908931d8 in -[NSScriptSuiteRegistry aeteResource:]
#7 0x90893b28 in -[NSScriptingAppleEventHandler
handleGetAeteEvent:withReplyEvent:]
#8 0x908585ac in -[NSAppleEventManager
dispatchRawAppleEvent:withRawReply:handlerRefCon:]
#9 0x908b76c0 in _globalAEEventHandler
#10 0x91b56570 in aeProcessAppleEvent
#11 0x91b590cc in AEPutAttributePtr
#12 0x91b56478 in aeProcessAppleEvent
#13 0x96a82c04 in AEProcessAppleEvent
#14 0x9308da78 in _DPSNextEvent
#15 0x9309fb04 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:]
#16 0x930b15e4 in -[NSApplication run]
#17 0x9315f6b8 in NSApplicationMain
#18 0x00004018 in main at main.m:5
#19 0x00003d98 in _start at crt.c:267
#20 0x00003c18 in start
The Scripting Implementation:
I stripped down my XGP.scriptSuite and XGP.scriptTerminology files so
that all they do is define the NSApplication object, and I still get
this error.
I set NSAppleScriptEnabled to be a string of "YES" in the ExpertView
of Info.plist Entries of the XGP project's Target panel.
The XGP.scriptSuite (in the Resources folder of the app bundle) is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppleEventCode</key>
<string>XGPd</string>
<key>Classes</key>
<dict>
<key>NSApplication</key>
<dict>
<key>AppleEventCode</key>
<string>capp</string>
<key>Superclass</key>
<string>NSCoreSuite.NSApplication</string>
</dict>
</dict>
<key>Name</key>
<string>XGPSuite</string>
</dict>
</plist>
The XGP.scriptTerminology is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Classes</key>
<dict>
<key>Description</key>
<string>XGP-specific classes.</string>
<key>NSApplication</key>
<dict>
<key>Description</key>
<string>XGP's top level scripting object</string>
<key>Name</key>
<string>application</string>
<key>PluralName</key>
<string>applications</string>
</dict>
<key>Name</key>
<string>XGP suite</string>
</dict>
</dict>
</plist>
Thanks for reading this,
Lindsey Spratt
http://homepage.mac.com/lspratt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.