Revision: 29809
http://sourceforge.net/p/bibdesk/svn/29809
Author: hofman
Date: 2025-11-15 10:57:50 +0000 (Sat, 15 Nov 2025)
Log Message:
-----------
macro for encoding key
Modified Paths:
--------------
trunk/bibdesk/BDSKLinkedFile.m
Modified: trunk/bibdesk/BDSKLinkedFile.m
===================================================================
--- trunk/bibdesk/BDSKLinkedFile.m 2025-11-15 10:54:24 UTC (rev 29808)
+++ trunk/bibdesk/BDSKLinkedFile.m 2025-11-15 10:57:50 UTC (rev 29809)
@@ -54,6 +54,7 @@
#define ALIASDATA_KEY @"aliasData"
#define BOOKMARK_KEY @"bookmark"
#define RELATIVEPATH_KEY @"relativePath"
+#define URL_KEY @"URL"
static inline NSURL *BDSKCreateURLFromFSRef(const FSRef *inRef);
static inline BOOL BDSKPathToFSRef(NSString *inPath, FSRef *outRef);
@@ -274,7 +275,7 @@
}
- (id)initWithCoder:(NSCoder *)coder {
- if ([coder containsValueForKey:@"URL"])
+ if ([coder containsValueForKey:URL_KEY])
return (id)[[BDSKLinkedURL alloc] initWithCoder:coder];
else
return (id)[[BDSKConcreteLinkedAliasFileClass alloc]
initWithCoder:coder];
@@ -973,13 +974,13 @@
- (instancetype)initWithCoder:(NSCoder *)coder {
self = [super init];
if (self) {
- URL = [coder decodeObjectOfClass:[NSURL class] forKey:@"URL"];
+ URL = [coder decodeObjectOfClass:[NSURL class] forKey:URL_KEY];
}
return self;
}
- (void)encodeWithCoder:(NSCoder *)coder {
- [coder encodeObject:URL forKey:@"URL"];
+ [coder encodeObject:URL forKey:URL_KEY];
}
+ (BOOL)supportsSecureCoding { return YES; }
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