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

Method NewAt

tensor/tensorcore/table.go:412–420  ·  view source on GitHub ↗

NewAt inserts a new blank element at given index in the slice -- -1 means the end

(idx int)

Source from the content-addressed store, hash-verified

410// NewAt inserts a new blank element at given index in the slice -- -1
411// means the end
412func (tb *Table) NewAt(idx int) {
413 tb.NewAtSelect(idx)
414
415 tb.Table.InsertRows(idx, 1)
416
417 tb.SelectIndexEvent(idx, events.SelectOne)
418 tb.Update()
419 tb.IndexGrabFocus(idx)
420}
421
422// DeleteAt deletes element at given index from slice
423func (tb *Table) DeleteAt(idx int) {

Callers

nothing calls this directly

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 5

NewAtSelectMethod · 0.80
InsertRowsMethod · 0.80
SelectIndexEventMethod · 0.80
IndexGrabFocusMethod · 0.80
UpdateMethod · 0.65

Tested by

no test coverage detected