Revision: 28990 http://sourceforge.net/p/bibdesk/svn/28990 Author: hofman Date: 2025-02-06 16:49:38 +0000 (Thu, 06 Feb 2025) Log Message: ----------- rename variable
Modified Paths: -------------- trunk/bibdesk/BibDocument+Scripting.m Modified: trunk/bibdesk/BibDocument+Scripting.m =================================================================== --- trunk/bibdesk/BibDocument+Scripting.m 2025-02-06 16:43:59 UTC (rev 28989) +++ trunk/bibdesk/BibDocument+Scripting.m 2025-02-06 16:49:38 UTC (rev 28990) @@ -1116,9 +1116,9 @@ __block NSArray *returnPubs = nil; // construct the handler to process the pubs when we get them - void (^handler)(NSArray *) = NULL; + void (^importPubs)(NSArray *) = NULL; if (mergePub) { - handler = ^(NSArray *result){ + importPubs = ^(NSArray *result){ BibItem *pub = [result firstObject]; if (pub) { if (url != nil && (source != nil || searchTerm != nil)) { @@ -1150,7 +1150,7 @@ finished = YES; }; } else { - handler = ^(NSArray *result){ + importPubs = ^(NSArray *result){ if ([result count] > 0) { if (url != nil && (source != nil || searchTerm != nil)) { if ([[NSUserDefaults standardUserDefaults] boolForKey:BDSKUseLocalUrlAndUrlKey]) { @@ -1176,20 +1176,20 @@ for (BibItem *pub in source) // get complex strings with the correct macroResolver [tmpPubs addObject:[pub copyWithMacroResolver:[self macroResolver]]]; - handler(tmpPubs); + importPubs(tmpPubs); } else if ([source isKindOfClass:[NSString class]]) { if ([BDSKDOIParser canParseString:source]) - [BDSKDOIParser itemsFromString:source owner:self completionHandler:handler]; + [BDSKDOIParser itemsFromString:source owner:self completionHandler:importPubs]; else - handler([BDSKStringParser itemsFromString:source ofType:BDSKStringTypeUnknown owner:self error:NULL]); + importPubs([BDSKStringParser itemsFromString:source ofType:BDSKStringTypeUnknown owner:self error:NULL]); } else if ([source isKindOfClass:[NSURL class]]) { - [BDSKWebSearch searchItemsFromURL:source macroResolver:[self macroResolver] completionHandler:handler]; + [BDSKWebSearch searchItemsFromURL:source macroResolver:[self macroResolver] completionHandler:importPubs]; } else if (searchTerm) { - [BDSKGroupSearch searchUsingSearchTerm:searchTerm serverInfo:serverInfo macroResolver:[self macroResolver] completionHandler:handler]; + [BDSKGroupSearch searchUsingSearchTerm:searchTerm serverInfo:serverInfo macroResolver:[self macroResolver] completionHandler:importPubs]; } else if ([url isFileURL]) { - handler(@[[BibItem itemWithFileURL:url owner:self]]); + importPubs(@[[BibItem itemWithFileURL:url owner:self]]); } else if (url) { - handler(@[[BibItem itemWithURL:url title:nil owner:self]]); + importPubs(@[[BibItem itemWithURL:url title:nil owner:self]]); } else { finished = YES; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit