Revision: 29660
http://sourceforge.net/p/bibdesk/svn/29660
Author: hofman
Date: 2025-10-03 21:49:00 +0000 (Fri, 03 Oct 2025)
Log Message:
-----------
use dictionary literals
Modified Paths:
--------------
trunk/bibdesk/BDSKSharingServer.m
Modified: trunk/bibdesk/BDSKSharingServer.m
===================================================================
--- trunk/bibdesk/BDSKSharingServer.m 2025-10-03 21:42:25 UTC (rev 29659)
+++ trunk/bibdesk/BDSKSharingServer.m 2025-10-03 21:49:00 UTC (rev 29660)
@@ -326,9 +326,9 @@
NSNetService *aNetService = [[NSNetService alloc] initWithDomain:@""
type:BDSKNetServiceDomain name:aSharingName port:port];
[aNetService setDelegate:self];
- NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
- [BDSKSharingServer supportedProtocolVersion], BDSKTXTVersionKey,
- [[NSUserDefaults standardUserDefaults]
stringForKey:BDSKSharingRequiresPasswordKey] , BDSKTXTAuthenticateKey, nil];
+ NSDictionary *dictionary = @{BDSKTXTVersionKey:
+ [BDSKSharingServer supportedProtocolVersion],
+ BDSKTXTAuthenticateKey: [[NSUserDefaults
standardUserDefaults] stringForKey:BDSKSharingRequiresPasswordKey]};
[aNetService setTXTRecordData:[NSNetService
dataFromTXTRecordDictionary:dictionary]];
return aNetService;
@@ -551,7 +551,7 @@
NSString *errorDescription = NSLocalizedString(@"Unable to Share
Bibliographies Using Bonjour", @"Error description");
NSString *recoverySuggestion = NSLocalizedString(@"You may wish to
disable and re-enable sharing in BibDesk's preferences to see if the error
persists.", @"Error informative text");
- NSError *error = [NSError errorWithDomain:NSCocoaErrorDomain code:err
userInfo:[NSDictionary dictionaryWithObjectsAndKeys:errorDescription,
NSLocalizedDescriptionKey, errorMessage, NSLocalizedFailureReasonErrorKey,
recoverySuggestion, NSLocalizedRecoverySuggestionErrorKey, nil]];
+ NSError *error = [NSError errorWithDomain:NSCocoaErrorDomain code:err
userInfo:@{NSLocalizedDescriptionKey: errorDescription,
NSLocalizedFailureReasonErrorKey: errorMessage,
NSLocalizedRecoverySuggestionErrorKey: recoverySuggestion}];
// show the error in a modal dialog
[NSApp presentError:error];
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