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

Method OnBind

core/switch.go:79–84  ·  view source on GitHub ↗
(value any, tags reflect.StructTag)

Source from the content-addressed store, hash-verified

77}
78
79func (sw *Switch) OnBind(value any, tags reflect.StructTag) {
80 if d, ok := tags.Lookup("display"); ok {
81 errors.Log(sw.Type.SetString(d))
82 sw.SetType(sw.Type)
83 }
84}
85
86func (sw *Switch) Init() {
87 sw.Frame.Init()

Callers

nothing calls this directly

Calls 4

SetTypeMethod · 0.95
LogFunction · 0.92
LookupMethod · 0.65
SetStringMethod · 0.65

Tested by

no test coverage detected