control.gui_dict:MethodBundle

Allow a thread-safe modification of a guiObject.

Usage

Source

control.gui_dict:MethodBundle()

Methods

Name Description
add_change_handler() Add a handler to be called on every value change.
add_setup_method() Add a widget setup callable to the bundle.
apply() Apply all methods in the bundle on the given object.
connect_value_changed() Register the change handlers with the variable dispatcher.

add_change_handler()

Add a handler to be called on every value change.

Usage

Source

add_change_handler(function)

Parameters

function: callable
A callable (method or function) to be invoked.

Notes

Handlers must declare any used context explicitly by name. The allowed parameter names are variable, widget, and value.


add_setup_method()

Add a widget setup callable to the bundle.

Usage

Source

add_setup_method(function)

Parameters

function: callable
A callable (method or function) to be invoked. There is only one allowed parameter (the widget).

apply()

Apply all methods in the bundle on the given object.

Usage

Source

apply(obj)

connect_value_changed()

Register the change handlers with the variable dispatcher.

Usage

Source

connect_value_changed(
    obj,
    widget,
)