Revision: 29028
http://sourceforge.net/p/bibdesk/svn/29028
Author: hofman
Date: 2025-02-19 16:41:37 +0000 (Wed, 19 Feb 2025)
Log Message:
-----------
Add nullability to Foundation categories
Modified Paths:
--------------
trunk/bibdesk/BDSKRuntime.h
trunk/bibdesk/CFString_BDSKExtensions.h
trunk/bibdesk/DOMNode_BDSKExtensions.h
trunk/bibdesk/NSAppleEventDescriptor_BDSKExtensions.h
trunk/bibdesk/NSArray_BDSKExtensions.h
trunk/bibdesk/NSAttributedString_BDSKExtensions.h
trunk/bibdesk/NSCharacterSet_BDSKExtensions.h
trunk/bibdesk/NSData_BDSKExtensions.h
trunk/bibdesk/NSDate_BDSKExtensions.h
trunk/bibdesk/NSError_BDSKExtensions.h
trunk/bibdesk/NSFileManager_BDSKExtensions.h
trunk/bibdesk/NSGeometry_BDSKExtensions.h
trunk/bibdesk/NSInvocation_BDSKExtensions.h
trunk/bibdesk/NSNumber_BDSKExtensions.h
trunk/bibdesk/NSObject_BDSKExtensions.h
trunk/bibdesk/NSPasteboard_BDSKExtensions.h
trunk/bibdesk/NSPointerFunctions_BDSKExtensions.h
trunk/bibdesk/NSScanner_BDSKExtensions.h
trunk/bibdesk/NSScriptCommand_BDSKExtensions.h
trunk/bibdesk/NSSet_BDSKExtensions.h
trunk/bibdesk/NSSortDescriptor_BDSKExtensions.h
trunk/bibdesk/NSString_BDSKExtensions.h
trunk/bibdesk/NSTask_BDSKExtensions.h
trunk/bibdesk/NSURL_BDSKExtensions.h
trunk/bibdesk/NSXMLNode_BDSKExtensions.h
Modified: trunk/bibdesk/BDSKRuntime.h
===================================================================
--- trunk/bibdesk/BDSKRuntime.h 2025-02-19 15:31:14 UTC (rev 29027)
+++ trunk/bibdesk/BDSKRuntime.h 2025-02-19 16:41:37 UTC (rev 29028)
@@ -38,6 +38,10 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
extern IMP BDSKReplaceInstanceMethodImplementationFromSelector(Class aClass,
SEL aSelector, SEL impSelector);
extern void BDSKRequestConcreteImplementation(id self, SEL aSelector);
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/CFString_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/CFString_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/CFString_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -37,6 +37,7 @@
*/
#import <Cocoa/Cocoa.h>
+
CFArrayRef BDStringCreateComponentsBySeparatingByAnd(CFAllocatorRef allocator,
CFStringRef string);
// supposed to be used only for ASCII-only character sets
extern CFStringRef BDStringCreateByCollapsingCharactersInSet(CFAllocatorRef
allocator, CFStringRef string, CFCharacterSetRef charSet);
Modified: trunk/bibdesk/DOMNode_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/DOMNode_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/DOMNode_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -39,15 +39,19 @@
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface DOMNode (BDSKExtensions)
-- (NSArray *)nodesForXPath:(NSString *)xpath;
-- (DOMNode *)singleNodeForXPath:(NSString *)xpath;
-- (NSArray *)nodesForXPathExpression:(DOMXPathExpression *)xpathExpression;
-- (DOMNode *)singleNodeForXPathExpression:(DOMXPathExpression
*)xpathExpression;
+- (nullable NSArray *)nodesForXPath:(NSString *)xpath;
+- (nullable DOMNode *)singleNodeForXPath:(NSString *)xpath;
+- (nullable NSArray *)nodesForXPathExpression:(DOMXPathExpression
*)xpathExpression;
+- (nullable DOMNode *)singleNodeForXPathExpression:(DOMXPathExpression
*)xpathExpression;
-@property (nonatomic, readonly) NSString *stringValue;
-@property (nonatomic, readonly) NSString *stringValuePreservingMathJax;
-- (NSString *)stringValueOfAttribute:(NSString *)attrName;
+@property (nonatomic, nullable, readonly) NSString *stringValue;
+@property (nonatomic, nullable, readonly) NSString
*stringValuePreservingMathJax;
+- (nullable NSString *)stringValueOfAttribute:(NSString *)attrName;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSAppleEventDescriptor_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSAppleEventDescriptor_BDSKExtensions.h 2025-02-19
15:31:14 UTC (rev 29027)
+++ trunk/bibdesk/NSAppleEventDescriptor_BDSKExtensions.h 2025-02-19
16:41:37 UTC (rev 29028)
@@ -38,13 +38,16 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSAppleEventDescriptor (BDSKExtensions)
-@property (nonatomic, readonly) id objCObjectValue;
+@property (nonatomic, nullable, readonly) id objCObjectValue;
@end
@interface NSObject (BDSKNSAppleEventDescriptor)
-@property (nonatomic, readonly) NSAppleEventDescriptor *aeDescriptorValue;
+@property (nonatomic, nullable, readonly) NSAppleEventDescriptor
*aeDescriptorValue;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSArray_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSArray_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSArray_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,20 +38,21 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSArray (BDSKExtensions)
@property (nonatomic, readonly) id nonEmpty;
-@property (nonatomic, readonly) id secondObject;
-@property (nonatomic, readonly) id thirdObject;
-@property (nonatomic, readonly) id fourthObject;
-@property (nonatomic, readonly) id fifthObject;
-@property (nonatomic, readonly) id sixthObject;
-@property (nonatomic, readonly) id seventhObject;
-@property (nonatomic, readonly) id eighthObject;
-@property (nonatomic, readonly) id ninthObject;
-@property (nonatomic, readonly) id tenthObject;
+@property (nonatomic, nullable, readonly) id secondObject;
+@property (nonatomic, nullable, readonly) id thirdObject;
+@property (nonatomic, nullable, readonly) id fourthObject;
+@property (nonatomic, nullable, readonly) id fifthObject;
+@property (nonatomic, nullable, readonly) id sixthObject;
+@property (nonatomic, nullable, readonly) id seventhObject;
+@property (nonatomic, nullable, readonly) id eighthObject;
+@property (nonatomic, nullable, readonly) id ninthObject;
+@property (nonatomic, nullable, readonly) id tenthObject;
@property (nonatomic, readonly) NSArray *firstOneObjects;
@property (nonatomic, readonly) NSArray *firstTwoObjects;
@@ -110,3 +111,5 @@
- (void)mergeSortUsingDescriptors:(NSArray *)sortDescriptors;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSAttributedString_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSAttributedString_BDSKExtensions.h 2025-02-19 15:31:14 UTC
(rev 29027)
+++ trunk/bibdesk/NSAttributedString_BDSKExtensions.h 2025-02-19 16:41:37 UTC
(rev 29028)
@@ -38,6 +38,7 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSAttributedString (BDSKExtensions)
@@ -61,3 +62,5 @@
- (BOOL)removeTextColorAttribute;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSCharacterSet_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSCharacterSet_BDSKExtensions.h 2025-02-19 15:31:14 UTC
(rev 29027)
+++ trunk/bibdesk/NSCharacterSet_BDSKExtensions.h 2025-02-19 16:41:37 UTC
(rev 29028)
@@ -37,6 +37,7 @@
*/
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSCharacterSet (BDSKExtensions)
@@ -52,3 +53,5 @@
@property (class, nonatomic, readonly) NSCharacterSet
*endPunctuationCharacterSet;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSData_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSData_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSData_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -50,11 +50,13 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
extern NSString *BDSKEncodingConversionException;
@interface NSData (BDSKExtensions)
-+ (NSData *)sha1SignatureForFile:(NSString *)absolutePath;
++ (nullable NSData *)sha1SignatureForFile:(NSString *)absolutePath;
@property (nonatomic, readonly) NSData *sha1Signature;
@@ -62,8 +64,8 @@
@property (nonatomic, readonly) NSString *hexString;
@property (nonatomic, readonly) BOOL mightBeCompressed;
-@property (nonatomic, readonly) NSData *compressedData;
-@property (nonatomic, readonly) NSData *decompressedData;
+@property (nonatomic, nullable, readonly) NSData *compressedData;
+@property (nonatomic, nullable, readonly) NSData *decompressedData;
+ (NSData *)scriptingRtfWithDescriptor:(NSAppleEventDescriptor *)descriptor;
@property (nonatomic, readonly) id scriptingRtfDescriptor;
@@ -99,3 +101,5 @@
- (BOOL)appendUTF8StringData:(NSData *)data
encoding:(NSStringEncoding)encoding error:(NSError **)error;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSDate_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSDate_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSDate_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,6 +38,7 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, BDSKPeriod) {
BDSKPeriodDay = 1,
@@ -53,7 +54,7 @@
+ (NSDate *)dateWithMonth:(NSInteger)month year:(NSInteger)year;
+ (NSString *)formattedDateForMonth:(NSInteger)month year:(NSInteger)year;
-+ (NSDate *)dateWithStandardDescription:(NSString *)string;
++ (nullable NSDate *)dateWithStandardDescription:(NSString *)string;
@property (nonatomic, readonly) NSString *dateDescription;
@property (nonatomic, readonly) NSString *longDateDescription;
@@ -71,3 +72,5 @@
- (NSDate *)startOfPeriod:(BDSKPeriod)period byAdding:(NSInteger)offset
atHour:(NSInteger)hour minute:(NSInteger)minute second:(NSInteger)second;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSError_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSError_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSError_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,6 +38,8 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
// If we declare all the errors in one place, we can be sure the codes don't
overlap.
// This is the recommended way to check an NSError to see if it's a type we
can handle.
// Apple reserves codes < 0 for their own use (I think...)
@@ -76,13 +78,13 @@
@property (class, nonatomic, readonly) NSString *localErrorDomain;
// returns BibDesk-specific errors that don't allow valueForKey: and
setValue:forKey: usage
-+ (instancetype)localErrorWithCode:(NSInteger)code
localizedDescription:(NSString *)description;
-+ (instancetype)localErrorWithCode:(NSInteger)code
localizedDescription:(NSString *)description underlyingError:(NSError
*)underlyingError;
++ (instancetype)localErrorWithCode:(NSInteger)code
localizedDescription:(nullable NSString *)description;
++ (instancetype)localErrorWithCode:(NSInteger)code
localizedDescription:(nullable NSString *)description underlyingError:(nullable
NSError *)underlyingError;
// returns BibDesk-specific errors that can allow valueForKey: and
setValue:forKey: usage
-+ (instancetype)mutableErrorWithDomain:(NSString *)domain code:(NSInteger)code
userInfo:(NSDictionary *)dict;
-+ (instancetype)mutableLocalErrorWithCode:(NSInteger)code
localizedDescription:(NSString *)description;
-+ (instancetype)mutableLocalErrorWithCode:(NSInteger)code
localizedDescription:(NSString *)description underlyingError:(NSError
*)underlyingError;
++ (instancetype)mutableErrorWithDomain:(NSString *)domain code:(NSInteger)code
userInfo:(nullable NSDictionary *)dict;
++ (instancetype)mutableLocalErrorWithCode:(NSInteger)code
localizedDescription:(nullable NSString *)description;
++ (instancetype)mutableLocalErrorWithCode:(NSInteger)code
localizedDescription:(nullable NSString *)description underlyingError:(NSError
*)underlyingError;
// see if it has our local domain
@property (nonatomic, readonly) BOOL isLocalError;
@@ -90,3 +92,5 @@
@property (nonatomic, readonly) BOOL isMutable;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSFileManager_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSFileManager_BDSKExtensions.h 2025-02-19 15:31:14 UTC
(rev 29027)
+++ trunk/bibdesk/NSFileManager_BDSKExtensions.h 2025-02-19 16:41:37 UTC
(rev 29028)
@@ -66,6 +66,7 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSFileManager (BDSKExtensions)
@@ -73,7 +74,7 @@
@property (nonatomic, readonly) NSURL *applicationsDirectoryURL;
@property (nonatomic, readonly) NSURL *downloadFolderURL;
@property (nonatomic, readonly) NSURL *chewableItemsFolderURL;
-@property (nonatomic, readonly) NSURL *latestLyXPipeURL;
+@property (nonatomic, nullable, readonly) NSURL *latestLyXPipeURL;
- (void)copyFileFromSharedSupportToApplicationSupport:(NSString *)fileName
overwrite:(BOOL)overwrite;
@@ -81,10 +82,10 @@
// should only be used on the main thread
// implicity creates and 'retains' the base temp dir,
// this needs to be matched by a call to -cleanupTemporaryDirectoryAtURL:
eventually
-- (NSURL *)uniqueTemporaryDirectoryURLWithBasename:(NSString *)fileName;
+- (nullable NSURL *)uniqueTemporaryDirectoryURLWithBasename:(nullable NSString
*)fileName;
// needs to be called after being done with a unique temporary directory
-- (void)cleanupTemporaryDirectoryAtURL:(NSURL *)dirURL;
+- (void)cleanupTemporaryDirectoryAtURL:(nullable NSURL *)dirURL;
// !!! The next two methods are not thread safe, since they return a name
without creating a file, and other threads/processes may return the same value
@@ -92,9 +93,9 @@
- (NSURL *)uniqueFileURLWithName:(NSString *)fileName atURL:(NSURL
*)directoryURL isDirectory:(BOOL)isDirectory;
- (NSURL *)uniqueFileURL:(NSURL *)fileURL;
// creates a file in a system temp location; pass nil for fileName if you want
a UUID based name
-- (NSURL *)temporaryFileURLWithBasename:(NSString *)fileName;
+- (NSURL *)temporaryFileURLWithBasename:(nullable NSString *)fileName;
// creates a unique file name on the desktop
-- (NSURL *)desktopFileURLWithBasename:(NSString *)fileName;
+- (NSURL *)desktopFileURLWithBasename:(nullable NSString *)fileName;
// for spotlight stuff; thread safe
- (NSURL *)spotlightCacheFolderURLByCreating:(NSError **)anError;
@@ -107,6 +108,8 @@
- (BOOL)setAppleStringEncoding:(NSStringEncoding)nsEncoding atURL:(NSURL
*)fileURL error:(NSError **)error;
// uses createDirectoryAtPath:withIntermediateDirectories:attributes:error:
for the containing directory if necessary
-- (BOOL)createPathToURL:(NSURL *)fileURL attributes:(NSDictionary *)attributes;
+- (BOOL)createPathToURL:(NSURL *)fileURL attributes:(nullable NSDictionary
*)attributes;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSGeometry_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSGeometry_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSGeometry_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,6 +38,8 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
extern NSRect BDSKCenterRect(NSRect rect, NSSize size, BOOL flipped);
extern NSRect BDSKCenterRectVertically(NSRect rect, CGFloat height, BOOL
flipped);
extern NSRect BDSKCenterRectHorizontally(NSRect rect, CGFloat width);
@@ -53,3 +55,5 @@
NSDivideRect(rect, &ignored, &rect, amount, edge);
return rect;
}
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSInvocation_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSInvocation_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSInvocation_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,7 +38,10 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSInvocation (BDSKExtensions)
+ (instancetype)invocationWithTarget:(id)target selector:(SEL)selector;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSNumber_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSNumber_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSNumber_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,6 +38,7 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSNumber (BDSKExtensions)
@@ -49,3 +50,6 @@
@property (nonatomic, readonly) NSString *greekCounterValue;
@end
+
+NS_ASSUME_NONNULL_END
+
Modified: trunk/bibdesk/NSObject_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSObject_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSObject_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,11 +38,14 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSObject (BDSKExtensions)
-@property (nonatomic, readonly) NSScriptClassDescription
*scriptClassDescription;
+@property (nonatomic, nullable, readonly) NSScriptClassDescription
*scriptClassDescription;
-- (void)performSelectorOnce:(SEL)aSelector withObject:(id)anArgument
afterDelay:(NSTimeInterval)delay;
+- (void)performSelectorOnce:(SEL)aSelector withObject:(nullable id)anArgument
afterDelay:(NSTimeInterval)delay;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSPasteboard_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSPasteboard_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSPasteboard_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,6 +38,8 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
// Dummy subclass for reading from pasteboard
// Reads public.url before public.file-url, unlike NSURL, so it gets the
target URL for webloc/fileloc files rather than its file location
// Don't use for anything else
@@ -46,13 +48,15 @@
@interface NSPasteboard (BDSKExtensions)
-- (BOOL)writeURLs:(NSArray *)URLs names:(NSArray *)names;
-- (NSArray *)readURLNames;
+- (BOOL)writeURLs:(NSArray *)URLs names:(nullable NSArray *)names;
+- (nullable NSArray *)readURLNames;
-- (BOOL)canReadFileURLOfTypes:(NSArray *)types;
-- (NSArray *)readFileURLsOfTypes:(NSArray *)types;
+- (BOOL)canReadFileURLOfTypes:(nullable NSArray *)types;
+- (nullable NSArray *)readFileURLsOfTypes:(nullable NSArray *)types;
@property (nonatomic, readonly) BOOL canReadURL;
-- (NSArray *)readURLs;
+- (nullable NSArray *)readURLs;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSPointerFunctions_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSPointerFunctions_BDSKExtensions.h 2025-02-19 15:31:14 UTC
(rev 29027)
+++ trunk/bibdesk/NSPointerFunctions_BDSKExtensions.h 2025-02-19 16:41:37 UTC
(rev 29028)
@@ -38,6 +38,7 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSPointerFunctions (BDSKExtensions)
@@ -49,3 +50,5 @@
@property (class, nonatomic, readonly) NSPointerFunctions
*floatPointerFunctions;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSScanner_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSScanner_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSScanner_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,14 +38,17 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSScanner (BDSKExtensions)
- (BOOL)scanUnsignedInteger:(NSUInteger *)unsignedValue;
-- (BOOL)scanCharacter:(unichar *)ch;
-- (BOOL)peekCharacter:(unichar *)ch;
+- (BOOL)scanCharacter:(unichar * _Nullable)ch;
+- (BOOL)peekCharacter:(unichar * _Nullable)ch;
-- (BOOL)scanAppleScriptValueUpToCharactersInSet:stopSet intoObject:(id
*)object;
+- (BOOL)scanAppleScriptValueUpToCharactersInSet:stopSet intoObject:(id
_Nullable * _Nullable)object;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSScriptCommand_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSScriptCommand_BDSKExtensions.h 2025-02-19 15:31:14 UTC
(rev 29027)
+++ trunk/bibdesk/NSScriptCommand_BDSKExtensions.h 2025-02-19 16:41:37 UTC
(rev 29028)
@@ -38,10 +38,14 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface NSScriptCommand (BDSKExtensions)
-@property (nonatomic, readonly) NSScriptObjectSpecifier *subjectSpecifier;
+@property (nonatomic, nullable, readonly) NSScriptObjectSpecifier
*subjectSpecifier;
-- (NSArray *)arrayOfEvaluatedObjects:(id)objects;
+- (nullable NSArray *)arrayOfEvaluatedObjects:(id)objects;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSSet_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSSet_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSSet_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,8 +38,12 @@
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface NSSet (BDSKExtensions)
@property (nonatomic, readonly) id nonEmpty;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSSortDescriptor_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSSortDescriptor_BDSKExtensions.h 2025-02-19 15:31:14 UTC
(rev 29027)
+++ trunk/bibdesk/NSSortDescriptor_BDSKExtensions.h 2025-02-19 16:41:37 UTC
(rev 29028)
@@ -38,6 +38,7 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSSortDescriptor (BDSKExtensions)
@@ -44,3 +45,5 @@
+ (NSSortDescriptor *)tableSortDescriptorForIdentifier:(NSString *)tcID
ascending:(BOOL)ascend;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSString_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSString_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSString_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -64,9 +64,11 @@
#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface NSString (BDSKExtensions)
-+ (BOOL)isEmptyString:(NSString *)string;
++ (BOOL)isEmptyString:(nullable NSString *)string;
@property (class, nonatomic, readonly) NSString *emdashString; // '---'
@property (class, nonatomic, readonly) NSString *endashString; // '--'
@@ -102,7 +104,7 @@
@param cString NULL-terminated C string
@result (description)
*/
-+ (NSString *)stringWithFileSystemRepresentation:(const char *)cString;
++ (nullable NSString *)stringWithFileSystemRepresentation:(const char
*)cString;
/*!
@method stringWithTriStateValue:
@@ -121,7 +123,7 @@
@param encoding (description)
@result (description)
*/
-+ (NSString *)stringWithContentsOfURL:(NSURL *)fileURL
guessedEncoding:(NSStringEncoding)encoding;
++ (nullable NSString *)stringWithContentsOfURL:(NSURL *)fileURL
guessedEncoding:(NSStringEncoding)encoding;
/*!
@method unicodeNameOfCharacter:
@@ -157,7 +159,7 @@
@param encoding (description)
@result (description)
*/
-- (NSString *)initWithContentsOfURL:(NSURL *)fileURL
guessedEncoding:(NSStringEncoding)encoding;
+- (nullable NSString *)initWithContentsOfURL:(NSURL *)fileURL
guessedEncoding:(NSStringEncoding)encoding;
#pragma mark TeX cleaning
@@ -296,7 +298,7 @@
@property (nonatomic, readonly) NSString *stringByEscapingGroupPlistEntities;
@property (nonatomic, readonly) NSString *stringByUnescapingGroupPlistEntities;
-@property (nonatomic, readonly) NSString *lossyASCIIString;
+@property (nonatomic, nullable, readonly) NSString *lossyASCIIString;
#pragma mark Comparisons
@@ -481,7 +483,7 @@
@property (nonatomic, readonly) NSString *fullyEncodeAsIURI;
-@property (nonatomic, readonly) NSData *sha1Signature;
+@property (nonatomic, nullable, readonly) NSData *sha1Signature;
@property (nonatomic, readonly) NSString *stringByRemovingAliens;
@@ -513,9 +515,9 @@
@property (nonatomic, readonly) NSAttributedString *smallIcon;
@property (nonatomic, readonly) NSAttributedString *linkedIcon;
@property (nonatomic, readonly) NSAttributedString *linkedSmallIcon;
-@property (nonatomic, readonly) NSArray *SkimNotes;
-@property (nonatomic, readonly) NSString *textSkimNotes;
-@property (nonatomic, readonly) NSAttributedString *richTextSkimNotes;
+@property (nonatomic, nullable, readonly) NSArray *SkimNotes;
+@property (nonatomic, nullable, readonly) NSString *textSkimNotes;
+@property (nonatomic, nullable, readonly) NSAttributedString
*richTextSkimNotes;
@property (nonatomic, readonly) NSString *titleCapitalizedString;
@@ -543,9 +545,11 @@
- (void)replaceOccurrencesOfCharactersInSet:(NSCharacterSet *)set
withString:(NSString *)replaceString;
- (void)replaceComposedCharacters;
- (void)appendCharacter:(unichar)ch;
-- (void)appendStrings:(NSString *)first, ...;
+- (void)appendStrings:(nullable NSString *)first, ...;
- (void)backslashEscapeCharactersInSet:(NSCharacterSet *)charSet;
- (void)backslashUnescapeCharactersInSet:(NSCharacterSet *)charSet;
- (void)deleteCharactersAtIndexes:(NSIndexSet *)indexes;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSTask_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSTask_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSTask_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,8 +38,12 @@
#import <Foundation/Foundation.h>
+NS_ASSUME_NONNULL_BEGIN
+
@interface NSTask (BDSKExtensions)
-+ (NSString *)outputStringFromTaskWithLaunchPath:(NSString *)cmd
arguments:(NSArray *)args inputString:(NSString *)input;
-+ (NSData *)outputDataFromTaskWithLaunchPath:(NSString *)cmd
arguments:(NSArray *)args inputString:(NSString *)input;
-+ (NSData *)outputDataFromTaskWithLaunchPath:(NSString *)cmd
arguments:(NSArray *)args inputData:(NSData *)input;
++ (nullable NSString *)outputStringFromTaskWithLaunchPath:(NSString *)cmd
arguments:(nullable NSArray *)args inputString:(NSString *)input;
++ (nullable NSData *)outputDataFromTaskWithLaunchPath:(NSString *)cmd
arguments:(nullable NSArray *)args inputString:(NSString *)input;
++ (nullable NSData *)outputDataFromTaskWithLaunchPath:(NSString *)cmd
arguments:(nullable NSArray *)args inputData:(NSData *)input;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSURL_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSURL_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSURL_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -37,17 +37,18 @@
*/
#import <Cocoa/Cocoa.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSURL (BDSKExtensions)
-@property (nonatomic, readonly) NSURL *fileURLByStrictlyResolvingAliases;
-@property (nonatomic, readonly) NSURL *fileURLByResolvingAliases;
+@property (nonatomic, nullable, readonly) NSURL
*fileURLByStrictlyResolvingAliases;
+@property (nonatomic, nullable, readonly) NSURL *fileURLByResolvingAliases;
-+ (NSURL *)fileURLWithAliasData:(NSData *)aliasData bookmarkData:(NSData
*)bmData;
-+ (NSURL *)fileURLNoUIWithAliasData:(NSData *)aliasData bookmarkData:(NSData
*)bmData;
++ (nullable NSURL *)fileURLWithAliasData:(NSData *)aliasData
bookmarkData:(NSData *)bmData;
++ (nullable NSURL *)fileURLNoUIWithAliasData:(NSData *)aliasData
bookmarkData:(NSData *)bmData;
-+ (NSURL *)URLWithStringByNormalizingPercentEscapes:(NSString *)string;
-+ (NSURL *)URLWithStringByNormalizingPercentEscapes:(NSString *)string
baseURL:(NSURL *)baseURL;
++ (nullable NSURL *)URLWithStringByNormalizingPercentEscapes:(NSString
*)string;
++ (nullable NSURL *)URLWithStringByNormalizingPercentEscapes:(NSString
*)string baseURL:(nullable NSURL *)baseURL;
@property (class, nonatomic, readonly) NSCharacterSet *illegalURLCharacterSet;
@property (nonatomic, readonly) BOOL canConnect;
@@ -55,13 +56,13 @@
- (BOOL)hasDomain:(NSString *)domain;
- (BOOL)hasFirstPathComponent:(NSString *)pathComponent;
-@property (nonatomic, readonly) NSArray *SkimNotes;
-@property (nonatomic, readonly) NSString *textSkimNotes;
-@property (nonatomic, readonly) NSAttributedString *richTextSkimNotes;
-@property (nonatomic, readonly) NSArray *scriptingSkimNotes;
+@property (nonatomic, nullable, readonly) NSArray *SkimNotes;
+@property (nonatomic, nullable, readonly) NSString *textSkimNotes;
+@property (nonatomic, nullable, readonly) NSAttributedString
*richTextSkimNotes;
+@property (nonatomic, nullable, readonly) NSArray *scriptingSkimNotes;
@property (nonatomic) NSInteger finderLabel;
-@property (nonatomic, readonly) NSArray *openMetaTags;
+@property (nonatomic, nullable, readonly) NSArray *openMetaTags;
@property (nonatomic, readonly) double openMetaRating;
@property (nonatomic, readonly) NSData *md5Hash;
@@ -74,3 +75,5 @@
@property (nonatomic, readonly) NSAttributedString *linkedSmallIcon;
@end
+
+NS_ASSUME_NONNULL_END
Modified: trunk/bibdesk/NSXMLNode_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSXMLNode_BDSKExtensions.h 2025-02-19 15:31:14 UTC (rev
29027)
+++ trunk/bibdesk/NSXMLNode_BDSKExtensions.h 2025-02-19 16:41:37 UTC (rev
29028)
@@ -38,9 +38,12 @@
#import <WebKit/WebKit.h>
+NS_ASSUME_NONNULL_BEGIN
@interface NSXMLNode (BDSKExtensions)
-- (NSString *)stringValueOfAttribute:(NSString *)attrName;
+- (nullable NSString *)stringValueOfAttribute:(NSString *)attrName;
@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
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit