RelayBoolNot¶
Defined in module: wield.declarative.callbacks.state_booleans.RelayBoolNot
- class RelayBoolNot(*args, **kwargs)[source][github]¶
Bases:
RelayBoolBaseIs true iff state_label’s state is the state given
- __init__(sub_bool, **kwargs)[source][github]¶
- Parameters:
sub_bool – RelayBool this value takes the negation of
Methods
__init__(sub_bool, **kwargs)register([key, callback, call_immediate, ...])Register a function for callback when this bool's state changes.
register_via(reg_call, callback[, key, remove])Attributes
Returns T/F status of the bool
- register(key=None, callback=None, call_immediate=False, assumed_value=('<UNIQUE VALUE>', <function unique_generator.<locals>.UNIQUE_CLOSURE>), remove=False)[source][github]¶
Register a function for callback when this bool’s state changes.
- Parameters:
callback – function to register
call_immediate – call as the function is added
remove – (False) set to remove a callback
- Raises:
KeyErroron missing callback
The function should have the signature
- callback(bool_state):
- Parameters:
bool_state – state of the RelayBool’s new value