Revision: 2274 http://skim-app.svn.sourceforge.net/skim-app/?rev=2274&view=rev Author: hofman Date: 2007-06-11 14:50:30 -0700 (Mon, 11 Jun 2007)
Log Message: ----------- Correct script command handler name. Return empty array from find command without a match. Modified Paths: -------------- trunk/SKDocument.m trunk/Skim.sdef Modified: trunk/SKDocument.m =================================================================== --- trunk/SKDocument.m 2007-06-11 20:30:01 UTC (rev 2273) +++ trunk/SKDocument.m 2007-06-11 21:50:30 UTC (rev 2274) @@ -1014,10 +1014,12 @@ - (id)handleFindScriptCommand:(NSScriptCommand *)command { NSDictionary *args = [command evaluatedArguments]; id text = [args objectForKey:@"Text"]; + id specifier = nil; if ([text isKindOfClass:[NSString class]] == NO) { [command setScriptErrorNumber:NSArgumentsWrongScriptError]; [command setScriptErrorString:@"The text to find is missing or is not a string."]; + return nil; } else { id from = [args objectForKey:@"From"]; id backward = [args objectForKey:@"Backward"]; @@ -1034,10 +1036,10 @@ options |= NSCaseInsensitiveSearch; if (selection = [[self mainWindowController] findString:text fromSelection:selection withOptions:options]) - return [selection objectSpecifier]; + specifier = [selection objectSpecifier]; } - return nil; + return specifier ? specifier : [NSArray array]; } @end Modified: trunk/Skim.sdef =================================================================== --- trunk/Skim.sdef 2007-06-11 20:30:01 UTC (rev 2273) +++ trunk/Skim.sdef 2007-06-11 21:50:30 UTC (rev 2274) @@ -97,7 +97,7 @@ <cocoa method="handleGoToScriptCommand:"/> </responds-to> <responds-to name="find"> - <cocoa method="handleFindToScriptCommand:"/> + <cocoa method="handleFindScriptCommand:"/> </responds-to> </class> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Skim-app-commit mailing list Skim-app-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/skim-app-commit