Revision: 2304
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2304&view=rev
Author:   hofman
Date:     2007-06-14 09:38:23 -0700 (Thu, 14 Jun 2007)

Log Message:
-----------
Correct join script command. Remove synonym and check for missing optional 
arguments. Make sure we don't return nil.

Modified Paths:
--------------
    trunk/PDFSelection_SKExtensions.m
    trunk/Skim.sdef

Modified: trunk/PDFSelection_SKExtensions.m
===================================================================
--- trunk/PDFSelection_SKExtensions.m   2007-06-14 15:21:22 UTC (rev 2303)
+++ trunk/PDFSelection_SKExtensions.m   2007-06-14 16:38:23 UTC (rev 2304)
@@ -432,11 +432,12 @@
     id other = [args objectForKey:@"To"];
     BOOL continuous = [[args objectForKey:@"Contiguous"] boolValue];
     PDFSelection *selection = [PDFSelection selectionWithSpecifier:dP];
-    PDFSelection *otherSelection = [PDFSelection selectionWithSpecifier:other];
+    PDFSelection *otherSelection = other ? [PDFSelection 
selectionWithSpecifier:other] : nil;
     
     if (selection == nil)
         selection = otherSelection;
-    [selection addSelection:otherSelection];
+    if (otherSelection)
+        [selection addSelection:otherSelection];
     
     if (continuous) {
         NSArray *pages = [selection pages];
@@ -447,7 +448,7 @@
         selection = [[firstPage document] selectionFromPage:firstPage 
atCharacterIndex:firstIndex toPage:lastPage atCharacterIndex:lastIndex];
     }
     
-    return [selection objectSpecifier];
+    return selection ? [selection objectSpecifier] : [NSArray array];
 }
 
 @end

Modified: trunk/Skim.sdef
===================================================================
--- trunk/Skim.sdef     2007-06-14 15:21:22 UTC (rev 2303)
+++ trunk/Skim.sdef     2007-06-14 16:38:23 UTC (rev 2304)
@@ -944,7 +944,6 @@
         <command name="join" code="SKIMJoin"
             description="Get the pages of a document, page, note, or 
selection.">
             <cocoa class="SKJoinCommand"/>
-            <synonym name="pages for"/>
             <direct-parameter
                 description="The selection to add to.">
                 <type type="specifier" list="yes"/>


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

Reply via email to