MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _register

Method _register

tools/python-3.11.9-amd64/Lib/tkinter/__init__.py:1588–1608  ·  view source on GitHub ↗

Return a newly created Tcl function. If this function is called, the Python function FUNC will be executed. An optional function SUBST can be given which will be executed before FUNC.

(self, func, subst=None, needcleanup=1)

Source from the content-addressed store, hash-verified

1586 _nametowidget = nametowidget
1587
1588 def _register(self, func, subst=None, needcleanup=1):
1589 """Return a newly created Tcl function. If this
1590 function is called, the Python function FUNC will
1591 be executed. An optional function SUBST can
1592 be given which will be executed before FUNC."""
1593 f = CallWrapper(func, subst, self).__call__
1594 name = repr(id(f))
1595 try:
1596 func = func.__func__
1597 except AttributeError:
1598 pass
1599 try:
1600 name = name + func.__name__
1601 except AttributeError:
1602 pass
1603 self.tk.createcommand(name, f)
1604 if needcleanup:
1605 if self._tclCommands is None:
1606 self._tclCommands = []
1607 self._tclCommands.append(name)
1608 return name
1609
1610 register = _register
1611

Callers 7

afterMethod · 0.95
selection_handleMethod · 0.95
_bindMethod · 0.95
_optionsMethod · 0.95
image_createMethod · 0.45
wm_protocolMethod · 0.45
dumpMethod · 0.45

Calls 3

CallWrapperClass · 0.85
idFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected