MCPcopy
hub / github.com/beeware/toga / source_remove

Method source_remove

cocoa/src/toga_cocoa/widgets/tree.py:244–255  ·  view source on GitHub ↗
(self, *, index, item, parent=None)

Source from the content-addressed store, hash-verified

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

Callers 1

removeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected