Revision: 11503
          http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11503&view=rev
Author:   hofman
Date:     2007-11-09 09:07:51 -0800 (Fri, 09 Nov 2007)

Log Message:
-----------
Use Omni delegate method to delete items in a table.

Modified Paths:
--------------
    trunk/bibdesk/BDSKSearchBookmarkController.m

Modified: trunk/bibdesk/BDSKSearchBookmarkController.m
===================================================================
--- trunk/bibdesk/BDSKSearchBookmarkController.m        2007-11-09 17:04:29 UTC 
(rev 11502)
+++ trunk/bibdesk/BDSKSearchBookmarkController.m        2007-11-09 17:07:51 UTC 
(rev 11503)
@@ -377,17 +377,21 @@
     return [[tableColumn identifier] isEqualToString:@"label"] && [item 
bookmarkType] != BDSKSearchBookmarkTypeSeparator;
 }
 
-- (void)outlineView:(NSOutlineView *)ov deleteItems:(NSArray *)items {
+- (void)tableView:(NSTableView *)tv deleteRows:(NSArray *)rows {
+    NSMutableArray *items = [NSMutableArray array];
+    NSEnumerator *rowEnum = [rows objectEnumerator];
+    NSNumber *row;
+    
+    while (row = [rowEnum nextObject])
+        [items addObject:[outlineView itemAtRow:[row intValue]]];
+    
     NSEnumerator *itemEnum = [[self minimumCoverForBookmarks:items] 
reverseObjectEnumerator];
     BDSKSearchBookmark *item;
+    
     while (item = [itemEnum  nextObject])
         [self removeChildBookmark:item];
 }
 
-- (BOOL)outlineView:(NSOutlineView *)ov canDeleteItems:(NSArray *)items {
-    return [items count] > 0;
-}
-
 - (BOOL)outlineView:(NSOutlineView *)ov drawSeparatorRowForItem:(id)item {
     return [item bookmarkType] == BDSKSearchBookmarkTypeSeparator;
 }


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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to