Revision: 29661
          http://sourceforge.net/p/bibdesk/svn/29661
Author:   hofman
Date:     2025-10-03 21:54:51 +0000 (Fri, 03 Oct 2025)
Log Message:
-----------
don't define multiple designated initializers

Modified Paths:
--------------
    trunk/bibdesk/BDSKErrorManager.h
    trunk/bibdesk/BDSKErrorManager.m

Modified: trunk/bibdesk/BDSKErrorManager.h
===================================================================
--- trunk/bibdesk/BDSKErrorManager.h    2025-10-03 21:49:00 UTC (rev 29660)
+++ trunk/bibdesk/BDSKErrorManager.h    2025-10-03 21:54:51 UTC (rev 29661)
@@ -54,7 +54,7 @@
 
 @property (class, nonatomic, readonly) BDSKErrorManager *allItemsErrorManager;
 
-- (instancetype)initWithDocument:(BibDocument *)aDocument 
NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithDocument:(nullable BibDocument *)aDocument 
NS_DESIGNATED_INITIALIZER;
 
 @property (nonatomic, nullable, weak) BDSKErrorObjectController 
*errorController;
 

Modified: trunk/bibdesk/BDSKErrorManager.m
===================================================================
--- trunk/bibdesk/BDSKErrorManager.m    2025-10-03 21:49:00 UTC (rev 29660)
+++ trunk/bibdesk/BDSKErrorManager.m    2025-10-03 21:54:51 UTC (rev 29661)
@@ -49,7 +49,6 @@
 
 @interface BDSKErrorManager ()
 
-- (instancetype)init NS_DESIGNATED_INITIALIZER;
 @property (nonatomic, strong) NSString *documentDisplayName;
 @property (nonatomic, readonly) NSInteger uniqueNumber;
 
@@ -76,9 +75,14 @@
 {
     if(self = [super init]){
         errorController = nil;
-        editors = [[NSMutableArray alloc] initWithCapacity:3];
-        [self setSourceDocument:aDocument];
-        documentStringEncoding = [aDocument documentStringEncoding];
+        editors = [[NSMutableArray alloc] init];
+        if (aDocument) {
+            [self setSourceDocument:aDocument];
+            documentStringEncoding = [aDocument documentStringEncoding];
+        } else {
+            documentDisplayName = NSLocalizedString(@"All", @"Popup menu item 
for error window");
+            documentStringEncoding = [NSString defaultCStringEncoding];
+        }
     }
     return self;
 }
@@ -86,13 +90,7 @@
 // should be used only for allItemsErrorManager
 - (instancetype)init;
 {
-    if(self = [super init]){
-        errorController = nil;
-        editors = [[NSMutableArray alloc] init];
-        documentDisplayName = NSLocalizedString(@"All", @"Popup menu item for 
error window");
-        documentStringEncoding = [NSString defaultCStringEncoding];
-    }
-    return self;
+    return [self initWithDocument:nil];
 }
 
 - (void)dealloc;

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