Revision: 6909
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6909&view=rev
Author:   hofman
Date:     2010-11-30 12:38:33 +0000 (Tue, 30 Nov 2010)

Log Message:
-----------
present errors for all failed documents when opening a folder

Modified Paths:
--------------
    trunk/SKDocumentController.m

Modified: trunk/SKDocumentController.m
===================================================================
--- trunk/SKDocumentController.m        2010-11-28 13:27:58 UTC (rev 6908)
+++ trunk/SKDocumentController.m        2010-11-30 12:38:33 UTC (rev 6909)
@@ -311,13 +311,16 @@
         
         while (path = [dirEnum nextObject]) {
             NSURL *url = [NSURL fileURLWithPath:[basePath 
stringByAppendingPathComponent:path]];
-            if ([self documentClassForContentsOfURL:url])
-                doc = [self openDocumentWithContentsOfURL:url 
display:displayDocument error:&error] ?: doc;
+            if ([self documentClassForContentsOfURL:url]) {
+                // if we had a previous error and the caller isn't ignoring 
errors, we should inform the user now, as we will lose this error
+                if (outError && error)
+                    [self presentError:error];
+                if (doc = [self openDocumentWithContentsOfURL:url 
display:displayDocument error:&error])
+                    error = nil;
+            }
         }
-        
         if (doc == nil && outError)
             *outError = error ?: [NSError 
errorWithDomain:SKDocumentErrorDomain code:SKReadFileError 
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Unable 
to load file", @"Error description"), NSLocalizedDescriptionKey, nil]];
-        
         return doc;
     }
     return [super openDocumentWithContentsOfURL:absoluteURL 
display:displayDocument error:outError];


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

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to