Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

File elements



In a scriptable app I'd like to make an array of files accessible through AppleScript. I thought of adding an <element> in the .sdef with type "file", something like this:

<element type="file"
    <cocoa key="linkedFiles"/>
</element>

However, when I try to access it I get a log message complaining that "file" is not a class (even though it does work). So can I only use class elements (and not other value types) as the type of an element? If so, how could I add a to-many property of files? I don't seem to be able to create a "file" class as it conflicts with the built-in type.

A similar problem, I'd like to similarly add URLs. However there is no (built in) URL type, so they're simply strings (type="text"). However, the name of the element should be "URL", not "text". So I'd like to declare:

<element name="URL" plural="URLs" type="text"
    <cocoa key="linkedURLs"/>
</element>

However, element unfortunately does not have a "name" attribute, so this doesn't work (apart from the same problem as for files, as text is not a class). So how should I declare this case?

Christiaan

_______________________________________________
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


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.