MCPcopy Index your code
hub / github.com/rawpython/remi / on_connection

Method on_connection

editor/editor_widgets.py:248–258  ·  view source on GitHub ↗
(self, widget, dropDownValue)

Source from the content-addressed store, hash-verified

246 #getattr(self.refWidget, self.eventConnectionFuncName).editor_listener_callback = None
247
248 def on_connection(self, widget, dropDownValue):
249 if self.dropdownMethods.get_value() == 'None':
250 self.disconnect()
251 return
252
253 listener = self.dropdownMethods._selected_item.listenerInstance
254 kwargs = {}
255 if hasattr(getattr(self.refWidget, self.eventConnectionFuncName).event_method_bound, "_js_code"):
256 kwargs["js_stop_propagation"] = (self.eventConnectionFuncName not in ("onmousedown", "onmousemove", "onmouseleave", "onkeydown"))
257 getattr(self.refWidget, self.eventConnectionFuncName).do(
258 self.dropdownMethods._selected_item.listenerFunction, **kwargs)
259
260
261def copy_func(f):

Callers

nothing calls this directly

Calls 3

disconnectMethod · 0.95
get_valueMethod · 0.45
doMethod · 0.45

Tested by

no test coverage detected