# control.gui_dict:MethodBundle


Allow a thread-safe modification of a guiObject.


Usage

``` python
control.gui_dict:MethodBundle()
```


## Methods

| Name | Description |
|----|----|
| [add_change_handler()](#add_change_handler) | Add a handler to be called on every value change. |
| [add_setup_method()](#add_setup_method) | Add a widget setup callable to the bundle. |
| [apply()](#apply) | Apply all methods in the bundle on the given object. |
| [connect_value_changed()](#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

``` python
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](control.gui_dict.var.md#matr1x.control.gui_dict.var.value).

------------------------------------------------------------------------


### add_setup_method()


Add a widget setup callable to the bundle.


Usage

``` python
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

``` python
apply(obj)
```


------------------------------------------------------------------------


### connect_value_changed()


Register the change handlers with the variable dispatcher.


Usage

``` python
connect_value_changed(
    obj,
    widget,
)
```
