Revision: 22634
http://sourceforge.net/p/bibdesk/svn/22634
Author: hofman
Date: 2018-09-18 16:10:55 +0000 (Tue, 18 Sep 2018)
Log Message:
-----------
make variable more local
Modified Paths:
--------------
trunk/bibdesk/BDSKAddCommand.m
Modified: trunk/bibdesk/BDSKAddCommand.m
===================================================================
--- trunk/bibdesk/BDSKAddCommand.m 2018-09-18 16:08:14 UTC (rev 22633)
+++ trunk/bibdesk/BDSKAddCommand.m 2018-09-18 16:10:55 UTC (rev 22634)
@@ -51,7 +51,6 @@
id directParameter = [self directParameter];
// for "any" type, directParameter is an NSAppleEventDescriptor and
evaulatedReceiver is nil
NSArray *insertionObjects = [directParameter objCObjectValue];
- BOOL isArray = NO;
// evaluate object specifiers
if ([insertionObjects
respondsToSelector:@selector(objectsByEvaluatingSpecifier)] ||
@@ -62,15 +61,15 @@
insertionObjects = nil;
}
- isArray = [insertionObjects isKindOfClass:[NSArray class]];
-
if (insertionObjects == nil) {
[self setScriptErrorNumber:NSArgumentsWrongScriptError];
[self setScriptErrorString:NSLocalizedString(@"Invalid or missing
objects to add", @"Error description")];
} else {
+ BOOL isArray = [insertionObjects isKindOfClass:[NSArray class]];
+
// make sure we have an (unnested) array
- if ([insertionObjects isKindOfClass:[NSArray class]] == NO)
+ if (isArray == NO)
insertionObjects = [NSArray arrayWithObjects:insertionObjects,
nil];
else if (NSNotFound == [insertionObjects
indexOfObjectPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop){ return NO
== [obj isKindOfClass:[NSArray class]]; }])
insertionObjects = [insertionObjects
valueForKeyPath:@"@unionOfArrays.self"];
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