Thanks to Bill Cheeseman, I scrapped the old NSCoreSuite.sdef, which
is out of date, and incorporated the Skeleton.sdef Core Suite
definitions.
Well, I am still getting errors with open event.
I did more digging and here is what I found. If you use the Skeleton
open command as is, it says that the direct object can be either a
file or a list.
<command name="open" code="aevtodoc" description="Open a document.">
<direct-parameter description="The file(s) to be opened.">
<type type="file"/>
<type type="file" list="yes"/>
</direct-parameter>
<!--
According to TN2106, 'open' should return the resulting document
object. However, the Cocoa implementation does not do this yet.
<result type="specifier"/>
-->
</command>
With this as is, I get NSLog lines in XCode when running my app:
which points back to my earlier comments that XCode is getting an
object as the direct parameter, not a list.
So, I change the above by removing the "<type type="file"/>" line, so
now it says it ONLY accepts a list.
All starts working again.
So, you say maybe I'm doing something funky in my app. Well, I
created a NEW Cocoa document based application, with no added code. I
modified the info.plist file to say it is AppleScriptable and to
refer to the Skeleton.sdef file EXACTLY as it is - not a character
changed.
Go to Script Editor, tell this app to open such and such, and it give
the EXACT same error message as my app (the NSCFString message
above). Then, I modify Skeleton.sdef to take out the same line I did
in my app:
<type type="file"/>,
and voila, the script runs with a "real" error message that the file
cannot be opened (as I would expect).
I cannot post the project with this email, but will gladly mail it to
anyone who is interested to verify my results. I even rebooted this
morning just to be sure. I'm on the latest Tiger release.