add property setters in event class

use event property setters in examples

update README

patch bump
This commit is contained in:
onyx-and-iris
2022-10-06 16:45:15 +01:00
parent 243a43ac22
commit 0c60fe3d5e
4 changed files with 32 additions and 14 deletions

View File

@@ -302,20 +302,30 @@ The following methods are available:
example:
```python
# register the app self as an event observer
self.vban.subject.add(self)
# register an app to receive updates
class App():
def __init__(self, vban):
vban.subject.add(self)
...
```
#### `vban.event`
You may also add/remove event subscriptions as necessary with the Event class.
Use the event class to toggle updates as necessary.
The following properties are available:
- `pdirty`: boolean
- `mdirty`: boolean
- `midi`: boolean
- `ldirty`: boolean
example:
```python
vban.event.add("ldirty")
vban.event.ldirty = True
vban.event.remove("pdirty")
vban.event.pdirty = False
# get a list of currently subscribed
print(vban.event.get())