Add sample script for creating a new outgoing message in Mail, fix accessor for the 'name of author'

This commit is contained in:
Olof Hellman
2019-07-10 00:02:20 -07:00
parent f082961025
commit 9a730afb49
4 changed files with 93 additions and 4 deletions

View File

@@ -27,6 +27,11 @@ class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
return (scriptObjectSpecifier)
}
@objc(scriptingSpecifierDescriptor)
func scriptingSpecifierDescriptor() -> NSScriptObjectSpecifier {
return (self.objectSpecifier ?? NSScriptObjectSpecifier() )
}
// MARK: --- ScriptingObject protocol ---
var scriptingKey: String {
@@ -35,9 +40,6 @@ class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
// MARK: --- UniqueIdScriptingObject protocol ---
// I am not sure if account should prefer to be specified by name or by ID
// but in either case it seems like the accountID would be used as the keydata, so I chose ID
@objc(uniqueId)
var scriptingUniqueId:Any {
return author.authorID