Thread-topic: NSCoreSuite.sdef entry for "open file" is incorrect
User-agent: Microsoft-Entourage/11.2.5.060620
on 2006-09-09 10:59 AM, David Hoerl at email@hidden wrote:
> OK, finally found the problem with my application's use of "open
> file". Its appears that the problem is due to an incorrect "open
> file" entry in NSCoreSuite.sdef.
>
> I filed a bug rdar://4725273
>
> In short, the default NSApplication handler
> (handleOpenScriptCommand:) expects the direct parameter to be a list
> of files, but the sdef has the implicit "list="no".
>
> If you change the open command to be:
>
> <command name="open" code="aevtodoc" description="Open an object.">
> <direct-parameter description="The file(s) to be opened." type="file"
> list="yes"/>
> </command>
>
> then everything starts working [the change is the addition of list="yes"].
David, you are correct about the right way to declare the open file command.
However, this is shown correctly in the current official version of Apple's
sdef file for the Standard Suite (NSCoreSuite). Look at the Skeleton.sdef
file, in Xcode documentation and on the Web at
http://developer.apple.com/samplecode/ScriptingDefinitions/listing1.html
Skeleton.sdef also contains several other relatively new corrections to
previous versions of the sdef file, as well as several comments about
additional corrections that have not yet been made.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
PreFab Software - http://www.prefab.com/scripting.html
The AppleScript Sourcebook - http://www.AppleScriptSourcebook.com
Vermont Recipes - http://www.stepwise.com/Articles/VermontRecipes
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-implementors mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-implementors/email@hidden
This email sent to email@hidden