diff --git a/Mac/Resources/NetNewsWire.sdef b/Mac/Resources/NetNewsWire.sdef index 5dbe1b1e9..5e1245fb2 100644 --- a/Mac/Resources/NetNewsWire.sdef +++ b/Mac/Resources/NetNewsWire.sdef @@ -80,7 +80,7 @@ - + @@ -109,7 +109,7 @@ - + @@ -140,7 +140,7 @@ - + @@ -160,7 +160,7 @@ - + @@ -173,7 +173,7 @@ - + diff --git a/Mac/Scriptability/Account+Scriptability.swift b/Mac/Scriptability/Account+Scriptability.swift index ef68758a2..fc11f35e0 100644 --- a/Mac/Scriptability/Account+Scriptability.swift +++ b/Mac/Scriptability/Account+Scriptability.swift @@ -12,7 +12,7 @@ import Articles import Core @objc(ScriptableAccount) -@MainActor class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer { +@MainActor class ScriptableAccount: NSObject, UniqueIDScriptingObject, ScriptingObjectContainer { let account:Account init (_ account:Account) { @@ -52,12 +52,12 @@ import Core return "accounts" } - // MARK: --- UniqueIdScriptingObject protocol --- - + // 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 { + @objc(uniqueID) + var scriptingUniqueID:Any { return account.accountID } diff --git a/Mac/Scriptability/Article+Scriptability.swift b/Mac/Scriptability/Article+Scriptability.swift index d7f8e0564..5497dffd6 100644 --- a/Mac/Scriptability/Article+Scriptability.swift +++ b/Mac/Scriptability/Article+Scriptability.swift @@ -11,7 +11,7 @@ import Account import Articles @objc(ScriptableArticle) -class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer { +class ScriptableArticle: NSObject, UniqueIDScriptingObject, ScriptingObjectContainer { let article:Article let container:ScriptingObjectContainer @@ -33,13 +33,13 @@ class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectConta return "articles" } - // MARK: --- UniqueIdScriptingObject protocol --- + // MARK: --- UniqueIDScriptingObject protocol --- // articles have id in the NetNewsWire database and id in the feed // article.uniqueID here is the feed unique id - @objc(uniqueId) - var scriptingUniqueId:Any { + @objc(uniqueID) + var scriptingUniqueID:Any { return article.uniqueID } diff --git a/Mac/Scriptability/Author+Scriptability.swift b/Mac/Scriptability/Author+Scriptability.swift index 1b39cb0e9..3c0bb78a6 100644 --- a/Mac/Scriptability/Author+Scriptability.swift +++ b/Mac/Scriptability/Author+Scriptability.swift @@ -11,7 +11,7 @@ import Account import Articles @objc(ScriptableAuthor) -class ScriptableAuthor: NSObject, UniqueIdScriptingObject { +class ScriptableAuthor: NSObject, UniqueIDScriptingObject { let author:Author let container:ScriptingObjectContainer @@ -38,10 +38,10 @@ class ScriptableAuthor: NSObject, UniqueIdScriptingObject { return "authors" } - // MARK: --- UniqueIdScriptingObject protocol --- + // MARK: --- UniqueIDScriptingObject protocol --- - @objc(uniqueId) - var scriptingUniqueId:Any { + @objc(uniqueID) + var scriptingUniqueID:Any { return author.authorID } diff --git a/Mac/Scriptability/Feed+Scriptability.swift b/Mac/Scriptability/Feed+Scriptability.swift index c60f19a91..377195901 100644 --- a/Mac/Scriptability/Feed+Scriptability.swift +++ b/Mac/Scriptability/Feed+Scriptability.swift @@ -12,7 +12,7 @@ import Account import Articles @objc(ScriptableFeed) -@objcMembers class ScriptableFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer { +@objcMembers class ScriptableFeed: NSObject, UniqueIDScriptingObject, ScriptingObjectContainer { let feed:Feed let container:ScriptingObjectContainer @@ -39,12 +39,12 @@ import Articles return "feeds" } - // MARK: --- UniqueIdScriptingObject protocol --- + // 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) - @MainActor var scriptingUniqueId:Any { + @objc(uniqueID) + @MainActor var scriptingUniqueID:Any { return feed.feedID } diff --git a/Mac/Scriptability/Folder+Scriptability.swift b/Mac/Scriptability/Folder+Scriptability.swift index 1ce320f88..6b60a1bc5 100644 --- a/Mac/Scriptability/Folder+Scriptability.swift +++ b/Mac/Scriptability/Folder+Scriptability.swift @@ -12,7 +12,7 @@ import Articles import Core @objc(ScriptableFolder) -@MainActor class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer { +@MainActor class ScriptableFolder: NSObject, UniqueIDScriptingObject, ScriptingObjectContainer { let folder:Folder let container:ScriptingObjectContainer @@ -34,13 +34,13 @@ import Core return "folders" } - // MARK: --- UniqueIdScriptingObject protocol --- + // 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 { + @objc(uniqueID) + var scriptingUniqueID:Any { return folder.folderID } diff --git a/Mac/Scriptability/ScriptingObject.swift b/Mac/Scriptability/ScriptingObject.swift index 64187b6dc..75c0a5437 100644 --- a/Mac/Scriptability/ScriptingObject.swift +++ b/Mac/Scriptability/ScriptingObject.swift @@ -17,6 +17,6 @@ protocol NamedScriptingObject: ScriptingObject { var name:String { get } } -protocol UniqueIdScriptingObject: ScriptingObject { - var scriptingUniqueId:Any { get } +protocol UniqueIDScriptingObject: ScriptingObject { + var scriptingUniqueID:Any { get } } diff --git a/Mac/Scriptability/ScriptingObjectContainer.swift b/Mac/Scriptability/ScriptingObjectContainer.swift index cb56114a8..f5878d36e 100644 --- a/Mac/Scriptability/ScriptingObjectContainer.swift +++ b/Mac/Scriptability/ScriptingObjectContainer.swift @@ -26,11 +26,11 @@ extension ScriptingObjectContainer { return specifier } - func makeFormUniqueIDScriptObjectSpecifier(forObject object:UniqueIdScriptingObject) -> NSScriptObjectSpecifier? { + func makeFormUniqueIDScriptObjectSpecifier(forObject object:UniqueIDScriptingObject) -> NSScriptObjectSpecifier? { let containerClassDescription = self.scriptingClassDescription let containerScriptObjectSpecifier = self.objectSpecifier let scriptingKey = object.scriptingKey - let uniqueID = object.scriptingUniqueId + let uniqueID = object.scriptingUniqueID let specifier = NSUniqueIDSpecifier(containerClassDescription:containerClassDescription, containerSpecifier:containerScriptObjectSpecifier, key:scriptingKey, uniqueID: uniqueID) return specifier