| 242 | self.source_remove(index=index, item=item, parent=parent) |
| 243 | |
| 244 | def source_remove(self, *, index, item, parent=None): |
| 245 | try: |
| 246 | index = self.native_tree.childIndexForItem(item._impl) |
| 247 | index_set = NSIndexSet.indexSetWithIndex(index) |
| 248 | parent = self.native_tree.parentForItem(item._impl) |
| 249 | self.native_tree.removeItemsAtIndexes( |
| 250 | index_set, |
| 251 | inParent=parent, |
| 252 | withAnimation=NSTableViewAnimation.SlideUp.value, |
| 253 | ) |
| 254 | except AttributeError: |
| 255 | pass |
| 256 | |
| 257 | # Alias for backwards compatibility: |
| 258 | # March 2026: In 0.5.3 and earlier, notification methods |