Revision: 24772 http://sourceforge.net/p/bibdesk/svn/24772 Author: hofman Date: 2020-05-12 22:34:34 +0000 (Tue, 12 May 2020) Log Message: ----------- get name from server info dictionary so we can use it to get the named server info
Modified Paths: -------------- trunk/bibdesk/BibDocument+Scripting.m Modified: trunk/bibdesk/BibDocument+Scripting.m =================================================================== --- trunk/bibdesk/BibDocument+Scripting.m 2020-05-12 22:12:04 UTC (rev 24771) +++ trunk/bibdesk/BibDocument+Scripting.m 2020-05-12 22:34:34 UTC (rev 24772) @@ -1110,11 +1110,10 @@ id server = [params objectForKey:@"server"]; if (server || synchronous == NO) { // the server can be a scriptingServerInfo dictionary, a .bdsksearch file URL, a x-bdsk-search URL, or a default server name + if ([server isKindOfClass:[NSDictionary class]] && [server count] == 1 && [server objectForKey:@"name"]) + server = [server objectForKey:@"name"]; if ([server isKindOfClass:[NSDictionary class]]) { - if ([server count] == 1 && [server objectForKey:@"name"]) - server = [server objectForKey:@"name"]; - else - serverInfo = [[BDSKSearchGroup newServerInfo:nil withScriptingServerInfo:server] autorelease]; + serverInfo = [[BDSKSearchGroup newServerInfo:nil withScriptingServerInfo:server] autorelease]; } else if ([server isKindOfClass:[NSURL class]]) { serverInfo = [[[BDSKServerInfo alloc] initWithDictionary:[NSDictionary dictionaryWithContentsOfURL:[NSURL fileURLWithPath:server isDirectory:NO]]] autorelease]; } else if ([server isKindOfClass:[NSString class]]) { @@ -1126,7 +1125,7 @@ if (i != NSNotFound) serverInfo = [servers objectAtIndex:i]; } - } else if (server == nil && synchronous == NO) { + } else if (server == nil) { serverInfo = [[BDSKServerInfo alloc] initWithType:BDSKSearchGroupEntrez name:@"PubMed" database:@"pubmed" host:nil port:nil options:nil]; } if (serverInfo == nil) { 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