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

Method SetProperty

tree/nodebase.go:406–411  ·  view source on GitHub ↗

Property Storage: SetProperty sets given the given property to the given value.

(key string, value any)

Source from the content-addressed store, hash-verified

404
405// SetProperty sets given the given property to the given value.
406func (n *NodeBase) SetProperty(key string, value any) {
407 if n.Properties == nil {
408 n.Properties = map[string]any{}
409 }
410 n.Properties[key] = value
411}
412
413// Property returns the property value for the given key.
414// It returns nil if it doesn't exist.

Callers 15

SetColorPropertiesMethod · 0.95
configMethod · 0.80
MakeRowMethod · 0.80
InitMethod · 0.80
MakeRowMethod · 0.80
MakeValueMethod · 0.80
MakeGridIndexMethod · 0.80
CompileMethod · 0.80
CompileMethod · 0.80
ConfigBodyShapeMethod · 0.80
ConfigViewMethod · 0.80
UpdatePoseNodeMethod · 0.80

Calls

no outgoing calls

Tested by 2

TestCoreLogoFunction · 0.64
TestPropertiesFunction · 0.64