aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTableView.m')
-rw-r--r--Source/SPTableView.m28
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index e135e16b..3fced944 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -241,6 +241,34 @@
emptyDoubleClickAction = aSelector;
}
+#ifdef SP_REFACTOR
+
+- (void)delete:(id)sender
+{
+ if ( [[self delegate] respondsToSelector:@selector(removeField:)] )
+ {
+ [[self delegate] performSelector:@selector(removeField:) withObject:self];
+ }
+ else if ( [[self delegate] respondsToSelector:@selector(removeIndex:)] )
+ {
+ [[self delegate] performSelector:@selector(removeIndex:) withObject:self];
+ }
+}
+
+
+- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
+{
+ if ( [menuItem action] == @selector(delete:) )
+ {
+ if ( [self numberOfSelectedRows] == 0 )
+ return NO;
+ }
+
+ return YES;
+}
+
+#endif
+
@end