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

View File

@@ -12,7 +12,7 @@ import Account
import Articles
@objc(ScriptableFeed)
class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer{
class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
let feed:Feed
let container:ScriptingObjectContainer