MCPcopy Create free account
hub / github.com/cogentcore/core / DeleteChildByName

Method DeleteChildByName

tree/nodebase.go:363–369  ·  view source on GitHub ↗

DeleteChildByName deletes child node by name, returning false if it can not find it.

(name string)

Source from the content-addressed store, hash-verified

361// DeleteChildByName deletes child node by name, returning false
362// if it can not find it.
363func (n *NodeBase) DeleteChildByName(name string) bool {
364 idx := IndexByName(n.Children, name)
365 if idx < 0 {
366 return false
367 }
368 return n.DeleteChildAt(idx)
369}
370
371// DeleteChildren deletes all children nodes.
372func (n *NodeBase) DeleteChildren() {

Callers 9

InitMethod · 0.80
setZoomMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
SetSelectedMethod · 0.80
SelectBoxMethod · 0.80
ManipBoxMethod · 0.80
GradientDeleteForNodeMethod · 0.80

Calls 2

DeleteChildAtMethod · 0.95
IndexByNameFunction · 0.85

Tested by 1