Revision: 29013 http://sourceforge.net/p/bibdesk/svn/29013 Author: hofman Date: 2025-02-17 15:42:35 +0000 (Mon, 17 Feb 2025) Log Message: ----------- Add nullability to scripting classes and categories
Modified Paths: -------------- trunk/bibdesk/BDSKAddCommand.h trunk/bibdesk/BDSKAppController+Scripting.h trunk/bibdesk/BDSKBookmark+Scripting.h trunk/bibdesk/BDSKCondition+Scripting.h trunk/bibdesk/BDSKField.h trunk/bibdesk/BDSKFieldInfo.h trunk/bibdesk/BDSKGroup+Scripting.h trunk/bibdesk/BDSKInfo.h trunk/bibdesk/BDSKMacro.h trunk/bibdesk/BDSKMacroResolver+Scripting.h trunk/bibdesk/BDSKParseFormatCommand.h trunk/bibdesk/BDSKPublicationCommand.h trunk/bibdesk/BDSKRemoveCommand.h trunk/bibdesk/BDSKResolveCommand.h trunk/bibdesk/BDSKRichTextForCommand.h trunk/bibdesk/BDSKScriptHook+Scripting.h trunk/bibdesk/BDSKSearchBookmark+Scripting.h trunk/bibdesk/BDSKSearchForCommand.h trunk/bibdesk/BDSKSelectCommand.h trunk/bibdesk/BDSKServerInfo+Scripting.h trunk/bibdesk/BDSKSortCommand.h trunk/bibdesk/BDSKTemplate+Scripting.h trunk/bibdesk/BDSKTypeInfo.h trunk/bibdesk/BibAuthor+Scripting.h trunk/bibdesk/BibDocument+Scripting.h trunk/bibdesk/BibItem+Scripting.h trunk/bibdesk/NSAttributedString+Scripting.h trunk/bibdesk/NSWindow+Scripting.h Modified: trunk/bibdesk/BDSKAddCommand.h =================================================================== --- trunk/bibdesk/BDSKAddCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKAddCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,9 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKAddCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKAppController+Scripting.h =================================================================== --- trunk/bibdesk/BDSKAppController+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKAppController+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,11 +39,13 @@ #import <Cocoa/Cocoa.h> #import "BDSKAppController.h" +NS_ASSUME_NONNULL_BEGIN + @class BDSKScriptHook, BDSKMacro, BDSKBookmark, BDSKSearchBookmark, BDSKTypeInfo, BDSKFieldInfo, BDSKTemplate, BDSKServerInfo; @interface BDSKAppController (Scripting) -@property (nonatomic, readonly) NSString *papersFolder; +@property (nonatomic, nullable, readonly) NSString *papersFolder; @property (nonatomic, readonly) NSString *citeKeyFormat; @property (nonatomic, readonly) NSString *localFileFormat; @@ -54,7 +56,7 @@ @property (nonatomic, readonly) id clipboard; -- (BDSKScriptHook *)valueInScriptHooksWithUniqueID:(NSString *)uniqueID; +- (nullable BDSKScriptHook *)valueInScriptHooksWithUniqueID:(NSString *)uniqueID; - (BDSKMacro *)valueInMacrosWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *macros; @@ -88,3 +90,5 @@ @property (nonatomic, readonly) NSArray *serverInfos; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKBookmark+Scripting.h =================================================================== --- trunk/bibdesk/BDSKBookmark+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKBookmark+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,11 +39,13 @@ #import <Cocoa/Cocoa.h> #import "BDSKBookmark.h" +NS_ASSUME_NONNULL_BEGIN + @interface BDSKBookmark (Scripting) -@property (nonatomic, strong) NSString *scriptingURL; +@property (nonatomic, nullable, strong) NSString *scriptingURL; -@property (nonatomic, readonly) BDSKBookmark *scriptingParent; +@property (nonatomic, nullable, readonly) BDSKBookmark *scriptingParent; @property (nonatomic, readonly) NSArray *entireContents; @@ -52,3 +54,5 @@ - (void)removeObjectFromBookmarksAtIndex:(NSUInteger)anIndex; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKCondition+Scripting.h =================================================================== --- trunk/bibdesk/BDSKCondition+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKCondition+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,6 +39,8 @@ #import <Cocoa/Cocoa.h> #import "BDSKCondition.h" +NS_ASSUME_NONNULL_BEGIN + @interface BDSKCondition (Scripting) - (instancetype)initWithScriptingProperties:(NSDictionary *)properties; @@ -48,3 +50,5 @@ @property (nonatomic, readonly) id scriptingValue; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKField.h =================================================================== --- trunk/bibdesk/BDSKField.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKField.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,8 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN + @class BibItem, BibAuthor; @interface BDSKField : NSObject { @@ -45,29 +47,31 @@ __weak BibItem *bibItem; } -- (instancetype)initWithName:(NSString *)newName bibItem:(BibItem *)newBibItem; +- (instancetype)initWithName:(NSString *)newName bibItem:(nullable BibItem *)newBibItem; @property (nonatomic, readonly) NSString *name; -@property (nonatomic, strong) NSString *value; +@property (nonatomic, nullable, strong) NSString *value; -@property (nonatomic, readonly) BibItem *publication; +@property (nonatomic, nullable, readonly) BibItem *publication; -@property (nonatomic, copy) NSString *bibTeXString; +@property (nonatomic, nullable, copy) NSString *bibTeXString; @property (nonatomic) NSInteger integerValue; -@property (nonatomic, copy) NSString *URLStringValue; +@property (nonatomic, nullable, copy) NSString *URLStringValue; -@property (nonatomic, copy) NSURL *fileURLValue; +@property (nonatomic, nullable, copy) NSURL *fileURLValue; -@property (nonatomic, strong) NSString *relativePathValue; +@property (nonatomic, nullable, strong) NSString *relativePathValue; @property (nonatomic, readonly, getter=isInherited) BOOL inherited; -@property (nonatomic, readonly) NSArray *scriptingAuthors; -- (BibAuthor *)valueInScriptingAuthorsWithName:(NSString *)aName; +@property (nonatomic, nullable, readonly) NSArray *scriptingAuthors; +- (nullable BibAuthor *)valueInScriptingAuthorsWithName:(NSString *)aName; -@property (nonatomic, readonly) NSArray *scriptingPublications; +@property (nonatomic, nullable, readonly) NSArray *scriptingPublications; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKFieldInfo.h =================================================================== --- trunk/bibdesk/BDSKFieldInfo.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKFieldInfo.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,8 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN + @interface BDSKFieldInfo : NSObject { NSString *name; } @@ -51,3 +53,5 @@ @property (nonatomic, readonly) NSInteger kind; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKGroup+Scripting.h =================================================================== --- trunk/bibdesk/BDSKGroup+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKGroup+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -49,18 +49,20 @@ #import "BDSKLastImportGroup.h" #import "BDSKWebGroup.h" +NS_ASSUME_NONNULL_BEGIN + @class BDSKMacro, BibItem, BibAuthor, BDSKCondition; @interface BDSKGroup (Scripting) -- (id)valueInScriptingPublicationsWithUniqueID:(NSString *)uniqueID; +- (nullable id)valueInScriptingPublicationsWithUniqueID:(NSString *)uniqueID; @property (nonatomic, readonly) NSArray *scriptingPublications; @property (nonatomic, readonly) NSArray *authors; -- (BibAuthor *)valueInAuthorsWithName:(NSString *)aName; +- (nullable BibAuthor *)valueInAuthorsWithName:(NSString *)aName; @property (nonatomic, readonly) NSArray *editors; -- (BibAuthor *)valueInEditorsWithName:(NSString *)aName; +- (nullable BibAuthor *)valueInEditorsWithName:(NSString *)aName; - (BDSKMacro *)valueInMacrosWithName:(NSString *)aName; @property (nonatomic, readonly) NSArray *macros; @@ -69,7 +71,7 @@ @property (nonatomic, readonly, getter=isExternal) BOOL external; -- (id)handleExportScriptCommand:(NSScriptCommand *)command; +- (nullable id)handleExportScriptCommand:(NSScriptCommand *)command; @end @@ -136,7 +138,7 @@ @property (nonatomic, copy) NSString *URLString; -@property (nonatomic, strong) NSURL *scriptingFileURL; +@property (nonatomic, nullable, strong) NSURL *scriptingFileURL; @end @@ -146,7 +148,7 @@ @property (nonatomic, strong) NSURL *scriptURL; -@property (nonatomic, readonly) NSString *scriptingScriptArguments; +@property (nonatomic, nullable, readonly) NSString *scriptingScriptArguments; @end @@ -154,7 +156,7 @@ @interface BDSKSearchGroup (Scripting) -@property (nonatomic, strong) NSString *scriptingSearchTerm; +@property (nonatomic, nullable, strong) NSString *scriptingSearchTerm; @property (nonatomic, copy) NSDictionary *scriptingServerInfo; @@ -175,6 +177,8 @@ @interface BDSKWebGroup (Scripting) -@property (nonatomic, copy) NSString *URLString; +@property (nonatomic, nullable, copy) NSString *URLString; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKInfo.h =================================================================== --- trunk/bibdesk/BDSKInfo.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKInfo.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,6 +39,7 @@ #import <Cocoa/Cocoa.h> #import "BibDocument.h" +NS_ASSUME_NONNULL_BEGIN @interface BDSKInfo : NSObject { NSString *name; @@ -49,8 +50,10 @@ @property (nonatomic, readonly) NSString *name; -@property (nonatomic, strong) NSString *value; +@property (nonatomic, nullable, strong) NSString *value; @property (nonatomic, readonly) BibDocument *document; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKMacro.h =================================================================== --- trunk/bibdesk/BDSKMacro.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKMacro.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,8 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN + @class BDSKMacroResolver; @interface BDSKMacro : NSObject { @@ -45,16 +47,18 @@ __weak BDSKMacroResolver *macroResolver; } -- (instancetype)initWithName:(NSString *)aName macroResolver:(BDSKMacroResolver *)aMacroResolver; +- (instancetype)initWithName:(NSString *)aName macroResolver:(nullable BDSKMacroResolver *)aMacroResolver; @property (nonatomic, strong) NSString *name; -@property (nonatomic, strong) id value; +@property (nonatomic, nullable, strong) id value; -@property (nonatomic, copy) id bibTeXString; +@property (nonatomic, nullable, copy) id bibTeXString; -@property (nonatomic, weak, readonly) BDSKMacroResolver *macroResolver; +@property (nonatomic, nullable, weak, readonly) BDSKMacroResolver *macroResolver; @property (nonatomic, readonly, getter=isExternal) BOOL external; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKMacroResolver+Scripting.h =================================================================== --- trunk/bibdesk/BDSKMacroResolver+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKMacroResolver+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,6 +39,8 @@ #import <Cocoa/Cocoa.h> #import "BDSKMacroResolver.h" +NS_ASSUME_NONNULL_BEGIN + @class BDSKMacro; // This class is not scriptable, but wrappers around this is used in several places @@ -49,3 +51,5 @@ @property (nonatomic, readonly) NSArray *macros; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKParseFormatCommand.h =================================================================== --- trunk/bibdesk/BDSKParseFormatCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKParseFormatCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,9 +38,9 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN -@interface BDSKParseFormatCommand : NSScriptCommand { +@interface BDSKParseFormatCommand : NSScriptCommand +@end -} - -@end +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKPublicationCommand.h =================================================================== --- trunk/bibdesk/BDSKPublicationCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKPublicationCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,9 +38,12 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKPublicationCommand : NSScriptCommand { NSScriptObjectSpecifier *keySpecifier; } -@property (nonatomic, readonly) NSScriptObjectSpecifier *keySpecifier; +@property (nonatomic, nullable, readonly) NSScriptObjectSpecifier *keySpecifier; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKRemoveCommand.h =================================================================== --- trunk/bibdesk/BDSKRemoveCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKRemoveCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,9 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKRemoveCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKResolveCommand.h =================================================================== --- trunk/bibdesk/BDSKResolveCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKResolveCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,8 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN + @interface BDSKResolveCommand : NSScriptCommand @end @@ -50,3 +52,5 @@ @interface BDSKRelativePathCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKRichTextForCommand.h =================================================================== --- trunk/bibdesk/BDSKRichTextForCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKRichTextForCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,7 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKRichTextForCommand : NSScriptCommand @end @@ -50,3 +51,5 @@ @interface BDSKRelativePathForCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKScriptHook+Scripting.h =================================================================== --- trunk/bibdesk/BDSKScriptHook+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKScriptHook+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,11 +38,14 @@ #import "BDSKScriptHook.h" +NS_ASSUME_NONNULL_BEGIN @interface BDSKScriptHook (Scripting) -@property (nonatomic, readonly) NSString *scriptingField; -@property (nonatomic, readonly) NSArray *scriptingOldValues; -@property (nonatomic, readonly) NSArray *scriptingNewValues; +@property (nonatomic, nullable, readonly) NSString *scriptingField; +@property (nonatomic, nullable, readonly) NSArray *scriptingOldValues; +@property (nonatomic, nullable, readonly) NSArray *scriptingNewValues; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKSearchBookmark+Scripting.h =================================================================== --- trunk/bibdesk/BDSKSearchBookmark+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKSearchBookmark+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,13 +39,15 @@ #import <Cocoa/Cocoa.h> #import "BDSKSearchBookmark.h" +NS_ASSUME_NONNULL_BEGIN + @interface BDSKSearchBookmark (Scripting) @property (nonatomic, readonly) NSDictionary *scriptingServerInfo; -@property (nonatomic, readonly) NSString *scriptingSearchTerm; +@property (nonatomic, nullable, readonly) NSString *scriptingSearchTerm; -@property (nonatomic, readonly) BDSKSearchBookmark *scriptingParent; +@property (nonatomic, nullable, readonly) BDSKSearchBookmark *scriptingParent; @property (nonatomic, readonly) NSArray *entireContents; @@ -54,3 +56,5 @@ - (void)removeObjectFromSearchBookmarksAtIndex:(NSUInteger)anIndex; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKSearchForCommand.h =================================================================== --- trunk/bibdesk/BDSKSearchForCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKSearchForCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,9 @@ #import <Foundation/Foundation.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKSearchForCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKSelectCommand.h =================================================================== --- trunk/bibdesk/BDSKSelectCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKSelectCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,9 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKSelectCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKServerInfo+Scripting.h =================================================================== --- trunk/bibdesk/BDSKServerInfo+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKServerInfo+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,14 +39,18 @@ #import <Cocoa/Cocoa.h> #import "BDSKServerInfo.h" +NS_ASSUME_NONNULL_BEGIN + @interface BDSKServerInfo (Scripting) -@property (nonatomic, readonly) NSScriptObjectSpecifier *objectSpecifier; +@property (nonatomic, nullable, readonly) NSScriptObjectSpecifier *objectSpecifier; @property (nonatomic, readonly) NSDictionary *scriptingServerInfo; @property (nonatomic, readonly) NSString *scriptingName; -+ (BDSKServerInfo *)newServerInfo:(BDSKServerInfo *)serverInfo withScriptingServerInfo:(NSDictionary *)info; ++ (BDSKServerInfo *)newServerInfo:(nullable BDSKServerInfo *)serverInfo withScriptingServerInfo:(NSDictionary *)info; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKSortCommand.h =================================================================== --- trunk/bibdesk/BDSKSortCommand.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKSortCommand.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,9 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface BDSKSortCommand : NSScriptCommand @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKTemplate+Scripting.h =================================================================== --- trunk/bibdesk/BDSKTemplate+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKTemplate+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,9 +39,11 @@ #import <Cocoa/Cocoa.h> #import "BDSKTemplate.h" +NS_ASSUME_NONNULL_BEGIN + @interface BDSKTemplate (Scripting) -@property (nonatomic, readonly) NSScriptObjectSpecifier *objectSpecifier; +@property (nonatomic, nullable, readonly) NSScriptObjectSpecifier *objectSpecifier; @property (nonatomic, readonly) NSString *scriptingName; @@ -48,3 +50,5 @@ @property (nonatomic, readonly, getter=isRichText) BOOL richText; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BDSKTypeInfo.h =================================================================== --- trunk/bibdesk/BDSKTypeInfo.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BDSKTypeInfo.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,8 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN + @interface BDSKTypeInfo : NSObject { NSString *name; } @@ -52,3 +54,5 @@ @property (nonatomic, readonly, getter=isStandard) BOOL standard; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibAuthor+Scripting.h =================================================================== --- trunk/bibdesk/BibAuthor+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BibAuthor+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,13 +39,15 @@ #import "BibAuthor.h" #import "BibItem+Scripting.h" +NS_ASSUME_NONNULL_BEGIN + @interface BibAuthor (Scripting) -+ (NSArray *)authorsInPublications:(NSArray *)publications; -+ (BibAuthor *)authorWithName:(NSString *)aName inPublications:(NSArray *)publications; ++ (nullable NSArray *)authorsInPublications:(NSArray *)publications; ++ (nullable BibAuthor *)authorWithName:(NSString *)aName inPublications:(NSArray *)publications; -+ (NSArray *)editorsInPublications:(NSArray *)publications; -+ (BibAuthor *)editorWithName:(NSString *)aName inPublications:(NSArray *)publications; ++ (nullable NSArray *)editorsInPublications:(NSArray *)publications; ++ (nullable BibAuthor *)editorWithName:(NSString *)aName inPublications:(NSArray *)publications; @property (nonatomic, readonly) NSArray *scriptingPublications; @@ -54,3 +56,5 @@ - (void)handleShowScriptCommand:(NSScriptCommand *)command; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibDocument+Scripting.h =================================================================== --- trunk/bibdesk/BibDocument+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BibDocument+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,11 +38,13 @@ #import "BibDocument.h" +NS_ASSUME_NONNULL_BEGIN + @class BDSKMacro, BDSKInfo, BDSKGroup, BDSKStaticGroup, BDSKSmartGroup, BDSKCategoryGroup, BDSKURLGroup, BDSKScriptGroup, BDSKSearchGroup, BDSKSharedGroup, BDSKLibraryGroup, BDSKLastImportGroup, BDSKWebGroup; @interface BibDocument (Scripting) -- (id)valueInScriptingPublicationsWithUniqueID:(NSString *)uniqueID; +- (nullable id)valueInScriptingPublicationsWithUniqueID:(NSString *)uniqueID; @property (nonatomic, readonly) NSArray *scriptingPublications; - (void)insertObject:(BibItem *)pub inScriptingPublicationsAtIndex:(NSUInteger)idx; - (void)removeObjectFromScriptingPublicationsAtIndex:(NSUInteger)idx; @@ -54,72 +56,74 @@ @property (nonatomic, readonly) NSArray *infos; @property (nonatomic, readonly) NSArray *authors; -- (BibAuthor *)valueInAuthorsWithName:(NSString *)name; +- (nullable BibAuthor *)valueInAuthorsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *editors; -- (BibAuthor *)valueInEditorsWithName:(NSString *)name; +- (nullable BibAuthor *)valueInEditorsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *scriptingGroups; -- (BDSKGroup *)valueInScriptingGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKGroup *)valueInScriptingGroupsWithName:(NSString *)name; +- (nullable BDSKGroup *)valueInScriptingGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKGroup *)valueInScriptingGroupsWithName:(NSString *)name; - (void)insertObject:(BDSKGroup *)group inScriptingGroupsAtIndex:(NSUInteger)idx; - (void)removeObjectFromScriptingGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *staticGroups; -- (BDSKStaticGroup *)valueInStaticGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKStaticGroup *)valueInStaticGroupsWithName:(NSString *)name; +- (nullable BDSKStaticGroup *)valueInStaticGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKStaticGroup *)valueInStaticGroupsWithName:(NSString *)name; - (void)insertObject:(BDSKStaticGroup *)group inStaticGroupsAtIndex:(NSUInteger)idx; - (void)removeObjectFromStaticGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *smartGroups; -- (BDSKSmartGroup *)valueInSmartGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKSmartGroup *)valueInSmartGroupsWithName:(NSString *)name; +- (nullable BDSKSmartGroup *)valueInSmartGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKSmartGroup *)valueInSmartGroupsWithName:(NSString *)name; - (void)insertObject:(BDSKSmartGroup *)group inSmartGroupsAtIndex:(NSUInteger)idx; - (void)removeObjectFromSmartGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *fieldGroups; -- (BDSKCategoryGroup *)valueInFieldGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKCategoryGroup *)valueInFieldGroupsWithName:(NSString *)name; +- (nullable BDSKCategoryGroup *)valueInFieldGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKCategoryGroup *)valueInFieldGroupsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *externalFileGroups; -- (BDSKURLGroup *)valueInExternalFileGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKURLGroup *)valueInExternalFileGroupsWithName:(NSString *)name; +- (nullable BDSKURLGroup *)valueInExternalFileGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKURLGroup *)valueInExternalFileGroupsWithName:(NSString *)name; - (void)insertObject:(BDSKURLGroup *)group inExternalFileGroupsAtIndex:(NSUInteger)idx; - (void)removeObjectFromExternalFileGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *scriptGroups; -- (BDSKScriptGroup *)valueInScriptGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKScriptGroup *)valueInScriptGroupsWithName:(NSString *)name; +- (nullable BDSKScriptGroup *)valueInScriptGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKScriptGroup *)valueInScriptGroupsWithName:(NSString *)name; - (void)removeObjectFromScriptGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *webGroups; -- (BDSKWebGroup *)valueInWebGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKWebGroup *)valueInWebGroupsWithName:(NSString *)name; +- (nullable BDSKWebGroup *)valueInWebGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKWebGroup *)valueInWebGroupsWithName:(NSString *)name; - (void)insertObject:(BDSKWebGroup *)group inWebGroupsAtIndex:(NSUInteger)idx; - (void)removeObjectFromWebGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *searchGroups; -- (BDSKSearchGroup *)valueInSearchGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKSearchGroup *)valueInSearchGroupsWithName:(NSString *)name; +- (nullable BDSKSearchGroup *)valueInSearchGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKSearchGroup *)valueInSearchGroupsWithName:(NSString *)name; - (void)insertObject:(BDSKSearchGroup *)group inSearchGroupsAtIndex:(NSUInteger)idx; - (void)removeObjectFromSearchGroupsAtIndex:(NSUInteger)idx; @property (nonatomic, readonly) NSArray *sharedGroups; -- (BDSKSharedGroup *)valueInSharedGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKSharedGroup *)valueInSharedGroupsWithName:(NSString *)name; +- (nullable BDSKSharedGroup *)valueInSharedGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKSharedGroup *)valueInSharedGroupsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *libraryGroups; -- (BDSKGroup *)valueInLibraryGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKGroup *)valueInLibraryGroupsWithName:(NSString *)name; +- (nullable BDSKGroup *)valueInLibraryGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKGroup *)valueInLibraryGroupsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *lastImportGroups; -- (BDSKGroup *)valueInLastImportGroupsWithUniqueID:(NSString *)aUniqueID; -- (BDSKGroup *)valueInLastImportGroupsWithName:(NSString *)name; +- (nullable BDSKGroup *)valueInLastImportGroupsWithUniqueID:(NSString *)aUniqueID; +- (nullable BDSKGroup *)valueInLastImportGroupsWithName:(NSString *)name; -@property (nonatomic, copy) NSArray *selection; -@property (nonatomic, copy) NSArray *groupSelection; +@property (nonatomic, nullable, copy) NSArray *selection; +@property (nonatomic, nullable, copy) NSArray *groupSelection; -- (id)handleExportScriptCommand:(NSScriptCommand *)command; -- (id)handleImportScriptCommand:(NSScriptCommand *)command; +- (nullable id)handleExportScriptCommand:(NSScriptCommand *)command; +- (nullable id)handleImportScriptCommand:(NSScriptCommand *)command; @end + +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/BibItem+Scripting.h =================================================================== --- trunk/bibdesk/BibItem+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/BibItem+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -39,10 +39,11 @@ #import "BibItem.h" #import "BDSKField.h" +NS_ASSUME_NONNULL_BEGIN @interface BibItem (Scripting) -- (BDSKField *)valueInBibFieldsWithName:(NSString *)name; +- (nullable BDSKField *)valueInBibFieldsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *bibFields; @property (nonatomic, readonly) NSArray *scriptingAuthors; @@ -49,7 +50,7 @@ - (BibAuthor*)valueInScriptingAuthorsWithName:(NSString*)name; @property (nonatomic, readonly) NSArray *scriptingEditors; -- (BibAuthor *)valueInScriptingEditorsWithName:(NSString *)name; +- (nullable BibAuthor *)valueInScriptingEditorsWithName:(NSString *)name; @property (nonatomic, readonly) NSArray *linkedFiles; - (void)insertObject:(NSURL *)newURL inLinkedFilesAtIndex:(NSUInteger)idx; @@ -61,8 +62,8 @@ @property (nonatomic, readonly) id uniqueID; -@property (nonatomic, readonly) id scriptingDocument; -@property (nonatomic, readonly) id group; +@property (nonatomic, nullable, readonly) id scriptingDocument; +@property (nonatomic, nullable, readonly) id group; @property (nonatomic, readonly, getter=isExternal) BOOL external; @@ -71,20 +72,20 @@ @property (nonatomic, strong) NSString*scriptingTitle; // wrapping original methods -@property (nonatomic, readonly) NSDate *scriptingDate; -@property (nonatomic, readonly) NSDate *scriptingDateAdded; -@property (nonatomic, readonly) NSDate *scriptingDateModified; +@property (nonatomic, nullable, readonly) NSDate *scriptingDate; +@property (nonatomic, nullable, readonly) NSDate *scriptingDateAdded; +@property (nonatomic, nullable, readonly) NSDate *scriptingDateModified; -@property (nonatomic, copy) NSColor *scriptingColor; +@property (nonatomic, nullable, copy) NSColor *scriptingColor; // more (pseudo) accessors for key-value coding -@property (nonatomic, copy) NSString *remoteURLString; -@property (nonatomic, copy) NSString *localURLString; +@property (nonatomic, nullable, copy) NSString *remoteURLString; +@property (nonatomic, nullable, copy) NSString *localURLString; -@property (nonatomic, strong) NSString *abstract; -@property (nonatomic, strong) NSString *annotation; +@property (nonatomic, nullable, strong) NSString *abstract; +@property (nonatomic, nullable, strong) NSString *annotation; -@property (nonatomic, copy) NSString *rssDescription; +@property (nonatomic, nullable, copy) NSString *rssDescription; @property (nonatomic, readonly) NSString *rssString; @property (nonatomic, readonly) NSString *risString; @@ -97,14 +98,12 @@ @property (nonatomic, readonly) NSScriptObjectSpecifier *objectSpecifier; -@property (nonatomic, strong) BibItem *scriptingCrossrefParent; +@property (nonatomic, nullable, strong) BibItem *scriptingCrossrefParent; - (void)handleShowScriptCommand:(NSScriptCommand *)command; -- (id)handleAutoFileScriptCommand:(NSScriptCommand *)command; -- (id)handleDownloadScriptCommand:(NSScriptCommand *)command; +- (nullable id)handleAutoFileScriptCommand:(NSScriptCommand *)command; +- (nullable id)handleDownloadScriptCommand:(NSScriptCommand *)command; @end - - - +NS_ASSUME_NONNULL_END Modified: trunk/bibdesk/NSAttributedString+Scripting.h =================================================================== --- trunk/bibdesk/NSAttributedString+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/NSAttributedString+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,6 +38,7 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface NSAttributedString (BDSKScripting) @@ -58,5 +59,8 @@ @interface NSApplication (BDSKRichTextFormat) -- (NSAttributedString *)valueInRichTextFormatWithName:(NSString *)name; +- (nullable NSAttributedString *)valueInRichTextFormatWithName:(NSString *)name; @end + +NS_ASSUME_NONNULL_END + Modified: trunk/bibdesk/NSWindow+Scripting.h =================================================================== --- trunk/bibdesk/NSWindow+Scripting.h 2025-02-17 15:10:43 UTC (rev 29012) +++ trunk/bibdesk/NSWindow+Scripting.h 2025-02-17 15:42:35 UTC (rev 29013) @@ -38,11 +38,14 @@ #import <Cocoa/Cocoa.h> +NS_ASSUME_NONNULL_BEGIN @interface NSWindow (BDSKScripting) -@property (nonatomic, readonly) id publication; +@property (nonatomic, nullable, readonly) id publication; -@property (nonatomic, readonly) id author; +@property (nonatomic, nullable, readonly) id author; @end + +NS_ASSUME_NONNULL_END This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit