Revision: 18518
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18518&view=rev
Author:   hofman
Date:     2012-02-23 13:14:46 +0000 (Thu, 23 Feb 2012)
Log Message:
-----------
placeholder implementation of filePathURL on Leopard

Modified Paths:
--------------
    trunk/bibdesk/BDSKDocumentController.m
    trunk/bibdesk/BibDocument.m
    trunk/bibdesk/NSURL_BDSKExtensions.m

Modified: trunk/bibdesk/BDSKDocumentController.m
===================================================================
--- trunk/bibdesk/BDSKDocumentController.m      2012-02-23 12:51:26 UTC (rev 
18517)
+++ trunk/bibdesk/BDSKDocumentController.m      2012-02-23 13:14:46 UTC (rev 
18518)
@@ -243,9 +243,7 @@
             }
         }
     } else {
-        if ([absoluteURL isFileURL] && [absoluteURL 
respondsToSelector:@selector(filePathURL)])
-            absoluteURL = [absoluteURL filePathURL];
-        doc = [super makeDocumentWithContentsOfURL:absoluteURL ofType:typeName 
error:outError];
+        doc = [super makeDocumentWithContentsOfURL:[absoluteURL filePathURL] 
ofType:typeName error:outError];
     }
     return doc;
 }

Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2012-02-23 12:51:26 UTC (rev 18517)
+++ trunk/bibdesk/BibDocument.m 2012-02-23 13:14:46 UTC (rev 18518)
@@ -1121,7 +1121,7 @@
 - (void)saveToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName 
forSaveOperation:(NSSaveOperationType)saveOperation delegate:(id)delegate 
didSaveSelector:(SEL)didSaveSelector contextInfo:(void *)contextInfo {
     // Override so we can determine if this is an autosave in 
writeToURL:ofType:error:.
     docState.currentSaveOperationType = saveOperation;
-    saveTargetURL = [([absoluteURL respondsToSelector:@selector(filePathURL)] 
? [absoluteURL filePathURL] : absoluteURL) copy];
+    saveTargetURL = [[absoluteURL filePathURL] copy];
     
     NSInvocation *invocation = nil;
     if (delegate && didSaveSelector) {

Modified: trunk/bibdesk/NSURL_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSURL_BDSKExtensions.m        2012-02-23 12:51:26 UTC (rev 
18517)
+++ trunk/bibdesk/NSURL_BDSKExtensions.m        2012-02-23 13:14:46 UTC (rev 
18518)
@@ -586,11 +586,17 @@
     return 
[(id)CFURLCreateCopyDeletingPathExtension(CFGetAllocator((CFURLRef)self), 
(CFURLRef)self) autorelease];
 }
 
+- (NSURL *)Leopard_filePathURL;
+{
+    return [self isFileURL] ? self : nil;
+}
+
 + (void)load {
     BDSKAddInstanceMethodImplementationFromSelector(self, 
@selector(lastPathComponent), @selector(Leopard_lastPathComponent));
     BDSKAddInstanceMethodImplementationFromSelector(self, 
@selector(pathExtension), @selector(Leopard_pathExtension));
     BDSKAddInstanceMethodImplementationFromSelector(self, 
@selector(URLByDeletingLastPathComponent), 
@selector(Leopard_URLByDeletingLastPathComponent));
     BDSKAddInstanceMethodImplementationFromSelector(self, 
@selector(URLByDeletingPathExtension), 
@selector(Leopard_URLByDeletingPathExtension));
+    BDSKAddInstanceMethodImplementationFromSelector(self, 
@selector(filePathURL), @selector(Leopard_filePathURL));
 }
 
 @end
\ No newline at end of file

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to