Revision: 4956
          http://skim-app.svn.sourceforge.net/skim-app/?rev=4956&view=rev
Author:   hofman
Date:     2008-11-13 16:29:02 +0000 (Thu, 13 Nov 2008)

Log Message:
-----------
check whether delegate can copy/delete for copy/delete validation in table 
subclasses

Modified Paths:
--------------
    trunk/SKOutlineView.m
    trunk/SKTableView.m

Modified: trunk/SKOutlineView.m
===================================================================
--- trunk/SKOutlineView.m       2008-11-13 16:13:24 UTC (rev 4955)
+++ trunk/SKOutlineView.m       2008-11-13 16:29:02 UTC (rev 4956)
@@ -117,9 +117,9 @@
     NSArray *items = [self selectedItems];
     if ([items count] && [[self delegate] 
respondsToSelector:@selector(outlineView:deleteItems:)]) {
         if ([[self delegate] 
respondsToSelector:@selector(outlineView:canDeleteItems:)])
-           return [[self delegate] outlineView:self canDeleteItems:items];
+            return [[self delegate] outlineView:self canDeleteItems:items];
         else
-            return YES;
+            return [[self delegate] 
respondsToSelector:@selector(outlineView:deleteItems:)];
     }
     return NO;
 }
@@ -135,9 +135,9 @@
     NSArray *items = [self selectedItems];
     if ([items count] && [[self delegate] 
respondsToSelector:@selector(outlineView:copyItems:)]) {
         if ([[self delegate] 
respondsToSelector:@selector(outlineView:canCopyItems:)])
-           return [[self delegate] outlineView:self canCopyItems:items];
+            return [[self delegate] outlineView:self canCopyItems:items];
         else
-            return YES;
+            return [[self delegate] 
respondsToSelector:@selector(outlineView:copyItems:)];
     }
     return NO;
 }

Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2008-11-13 16:13:24 UTC (rev 4955)
+++ trunk/SKTableView.m 2008-11-13 16:29:02 UTC (rev 4956)
@@ -95,9 +95,9 @@
     NSIndexSet *indexes = [self selectedRowIndexes];
     if ([indexes count] && [[self delegate] 
respondsToSelector:@selector(tableView:deleteRowsWithIndexes:)]) {
         if ([[self delegate] 
respondsToSelector:@selector(tableView:canDeleteRowsWithIndexes:)])
-           return [[self delegate] tableView:self 
canDeleteRowsWithIndexes:indexes];
+            return [[self delegate] tableView:self 
canDeleteRowsWithIndexes:indexes];
         else
-            return YES;
+            return [[self delegate] 
respondsToSelector:@selector(tableView:deleteRowsWithIndexes:)];
     }
     return NO;
 }
@@ -113,9 +113,9 @@
     NSIndexSet *indexes = [self selectedRowIndexes];
     if ([indexes count] && [[self delegate] 
respondsToSelector:@selector(tableView:copyRowsWithIndexes:)]) {
         if ([[self delegate] 
respondsToSelector:@selector(tableView:canCopyRowsWithIndexes:)])
-           return [[self delegate] tableView:self 
canCopyRowsWithIndexes:indexes];
+            return [[self delegate] tableView:self 
canCopyRowsWithIndexes:indexes];
         else
-            return YES;
+            return [[self delegate] 
respondsToSelector:@selector(tableView:copyRowsWithIndexes:)];
     }
     return NO;
 }


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 the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to