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

Method UpdateChange

core/widgetevents.go:194–197  ·  view source on GitHub ↗

UpdateChange is a helper function that calls [WidgetBase.SendChange] and then [WidgetBase.Update]. That is the correct order, since calling [WidgetBase.Update] first would cause the value of the widget to be incorrectly overridden in a [Value] context.

(original ...events.Event)

Source from the content-addressed store, hash-verified

192// calling [WidgetBase.Update] first would cause the value of the widget
193// to be incorrectly overridden in a [Value] context.
194func (wb *WidgetBase) UpdateChange(original ...events.Event) {
195 wb.SendChange(original...)
196 wb.Update()
197}
198
199func (wb *WidgetBase) sendKey(kf keymap.Functions, original ...events.Event) {
200 if wb.This == nil {

Callers 15

PasteAssignMethod · 0.80
openValueDialogFunction · 0.80
InitMethod · 0.80
NewAtMethod · 0.80
DeleteAtMethod · 0.80
NewAtMethod · 0.80
DeleteAtMethod · 0.80
setTimeMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80
InitMethod · 0.80

Calls 2

SendChangeMethod · 0.95
UpdateMethod · 0.95

Tested by

no test coverage detected