From: <ho...@us...> - 2015-09-27 11:40:41
|
Revision: 8886 http://sourceforge.net/p/skim-app/code/8886 Author: hofman Date: 2015-09-27 11:40:40 +0000 (Sun, 27 Sep 2015) Log Message: ----------- use method instead of function Modified Paths: -------------- trunk/SKScriptCommand.m Modified: trunk/SKScriptCommand.m =================================================================== --- trunk/SKScriptCommand.m 2015-09-27 11:31:36 UTC (rev 8885) +++ trunk/SKScriptCommand.m 2015-09-27 11:40:40 UTC (rev 8886) @@ -43,12 +43,12 @@ // Workaround for Cocoa Scripting and AppleScript bugs. // Cocoa Scripting does not accept range specifiers whose start/end specifier have an absolute container specifier, but AppleScript does not accept range specifiers with relative container specifiers, so we cannot return those from PDFSelection -static void fixRangeSpecifier(id object) { +- (void)fixRangeSpecifiers:(id)object { if ([object isKindOfClass:[NSArray class]]) { for (id subobject in (NSArray *)object) - fixRangeSpecifier(subobject); + [self fixRangeSpecifiers:subobject]; } else if ([object isKindOfClass:[NSScriptObjectSpecifier class]]) { - fixRangeSpecifier([(NSScriptObjectSpecifier *)object containerSpecifier]); + [self fixRangeSpecifiers:[(NSScriptObjectSpecifier *)object containerSpecifier]]; if ([object isKindOfClass:[NSRangeSpecifier class]]) { NSScriptObjectSpecifier *childSpec = [(NSRangeSpecifier *)object startSpecifier]; if ([childSpec containerSpecifier]) { @@ -65,18 +65,18 @@ } - (void)setReceiversSpecifier:(NSScriptObjectSpecifier *)receiversSpec { - fixRangeSpecifier(receiversSpec); + [self fixRangeSpecifiers:receiversSpec]; [super setReceiversSpecifier:receiversSpec]; } - (void)setArguments:(NSDictionary *)args { for (NSString *key in args) - fixRangeSpecifier([args objectForKey:key]); + [self fixRangeSpecifiers:[args objectForKey:key]]; [super setArguments:args]; } - (void)setDirectParameter:(id)directParameter { - fixRangeSpecifier(directParameter); + [self fixRangeSpecifiers:directParameter]; [super setDirectParameter:directParameter]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |