MCPcopy Index your code
hub / github.com/bugy/script-server / bind

Method bind

src/react/properties.py:43–53  ·  view source on GitHub ↗
(self, another_property, map_function=None)

Source from the content-addressed store, hash-verified

41 return self._value
42
43 def bind(self, another_property, map_function=None):
44 def binder(old_value, new_value):
45 if map_function:
46 value = map_function(new_value)
47 else:
48 value = new_value
49
50 self._set_internal(value)
51
52 another_property.subscribe(binder)
53 binder(None, another_property.get())
54
55
56class ObservableList(UserList):

Callers 4

_connectMethod · 0.80
__init__Method · 0.80
connectMethod · 0.80
createStyledElementsMethod · 0.80

Calls 2

subscribeMethod · 0.45
getMethod · 0.45

Tested by 1

connectMethod · 0.64