Revision: 29709
http://sourceforge.net/p/bibdesk/svn/29709
Author: hofman
Date: 2025-10-12 08:58:33 +0000 (Sun, 12 Oct 2025)
Log Message:
-----------
Go bback to using array for unresolved netservices and set for undecided
netservices, so we keep object instances while bbeing the delegate but can
still compare using isEqual, because removing can use a different instance.
Modified Paths:
--------------
trunk/bibdesk/BDSKSharingBrowser.h
trunk/bibdesk/BDSKSharingBrowser.m
Modified: trunk/bibdesk/BDSKSharingBrowser.h
===================================================================
--- trunk/bibdesk/BDSKSharingBrowser.h 2025-10-12 08:50:42 UTC (rev 29708)
+++ trunk/bibdesk/BDSKSharingBrowser.h 2025-10-12 08:58:33 UTC (rev 29709)
@@ -45,8 +45,8 @@
@interface BDSKSharingBrowser : NSObject <NSNetServiceDelegate,
NSNetServiceBrowserDelegate> {
NSMutableSet *sharingClients;
NSNetServiceBrowser *browser;
- NSHashTable *unresolvedNetServices;
- NSHashTable *undecidedNetServices;
+ NSMutableArray *unresolvedNetServices;
+ NSMutableSet *undecidedNetServices;
}
@property (class, nonatomic, readonly) BDSKSharingBrowser *sharedBrowser;
Modified: trunk/bibdesk/BDSKSharingBrowser.m
===================================================================
--- trunk/bibdesk/BDSKSharingBrowser.m 2025-10-12 08:50:42 UTC (rev 29708)
+++ trunk/bibdesk/BDSKSharingBrowser.m 2025-10-12 08:58:33 UTC (rev 29709)
@@ -196,8 +196,8 @@
browser = [[NSNetServiceBrowser alloc] init];
[browser setDelegate:self];
[browser searchForServicesOfType:BDSKNetServiceDomain inDomain:@""];
- unresolvedNetServices = [[NSHashTable alloc]
initWithOptions:NSHashTableStrongMemory | NSHashTableObjectPointerPersonality
capacity:5];
- undecidedNetServices = [[NSHashTable alloc]
initWithOptions:NSHashTableStrongMemory | NSHashTableObjectPointerPersonality
capacity:1];
+ unresolvedNetServices = [[NSMutableArray alloc] initWithCapacity:5];
+ undecidedNetServices = [[NSMutableSet alloc] initWithCapacity:1];
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
[nc postNotificationName:BDSKSharingClientsChangedNotification
object:self];
@@ -213,7 +213,7 @@
browser = nil;
- [[unresolvedNetServices allObjects] setValue:nil forKey:@"delegate"];
+ [unresolvedNetServices setValue:nil forKey:@"delegate"];
unresolvedNetServices = nil;
if ([undecidedNetServices count])
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