Revision: 29883
          http://sourceforge.net/p/bibdesk/svn/29883
Author:   hofman
Date:     2025-11-22 18:02:13 +0000 (Sat, 22 Nov 2025)
Log Message:
-----------
Use current methods to load array or dictionary from file

Modified Paths:
--------------
    trunk/bibdesk/BDSKMODSParser.m
    trunk/bibdesk/BDSKTemplateDocument.m
    trunk/bibdesk/NSString_BDSKExtensions.h

Modified: trunk/bibdesk/BDSKMODSParser.m
===================================================================
--- trunk/bibdesk/BDSKMODSParser.m      2025-11-22 17:58:33 UTC (rev 29882)
+++ trunk/bibdesk/BDSKMODSParser.m      2025-11-22 18:02:13 UTC (rev 29883)
@@ -51,7 +51,7 @@
 
 + (void)initialize{
     BDSKINITIALIZE;
-    MODSToMARCXSLTData = [[NSData alloc] initWithContentsOfFile:[[NSBundle 
mainBundle] pathForResource:@"MODS2MARC21slim" ofType:@"xsl"] 
options:NSMappedRead error:NULL];
+    MODSToMARCXSLTData = [[NSData alloc] initWithContentsOfURL:[[NSBundle 
mainBundle] URLForResource:@"MODS2MARC21slim" withExtension:@"xsl"] 
options:NSMappedRead error:NULL];
 }
 
 + (BOOL)canParseString:(NSString *)string{

Modified: trunk/bibdesk/BDSKTemplateDocument.m
===================================================================
--- trunk/bibdesk/BDSKTemplateDocument.m        2025-11-22 17:58:33 UTC (rev 
29882)
+++ trunk/bibdesk/BDSKTemplateDocument.m        2025-11-22 18:02:13 UTC (rev 
29883)
@@ -154,7 +154,7 @@
         [self setUndoManager:undoManager];
         
         NSBundle *bundle = [NSBundle mainBundle];
-        NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] 
initWithContentsOfFile:[bundle pathForResource:@"TemplateOptions" 
ofType:@"plist"]];
+        NSMutableDictionary *tmpDict = [[NSMutableDictionary alloc] 
initWithContentsOfURL:[bundle URLForResource:@"TemplateOptions" 
withExtension:@"plist"]];
         
         for (NSString *key in [tmpDict allKeys]) {
             NSMutableArray *array = [NSMutableArray array];

Modified: trunk/bibdesk/NSString_BDSKExtensions.h
===================================================================
--- trunk/bibdesk/NSString_BDSKExtensions.h     2025-11-22 17:58:33 UTC (rev 
29882)
+++ trunk/bibdesk/NSString_BDSKExtensions.h     2025-11-22 18:02:13 UTC (rev 
29883)
@@ -152,7 +152,7 @@
 + (NSStringEncoding)encodingForIANACharSetName:(NSString *)name;
     
 /*!
-    @method     initWithContentsOfFile:guessedEncoding:
+    @method     initWithContentsOfURL:guessedEncoding:
     @abstract   Tries to load a file with the specified encoding, it will 
employ some heuristics to guess the encoding if the specified encoding fails or 
is set to 0.
     @discussion (comprehensive description)
     @param      path (description)

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

Reply via email to