mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2024-11-24 22:00:53 +00:00
add error message in subject
This commit is contained in:
parent
520adc0a02
commit
6fad360ede
@ -12,25 +12,25 @@ class Subject:
|
|||||||
[o.on_update(modifier) for o in self._observers]
|
[o.on_update(modifier) for o in self._observers]
|
||||||
|
|
||||||
def add(self, observer):
|
def add(self, observer):
|
||||||
"""adds an observer to observables"""
|
"""adds an observer to _observers"""
|
||||||
|
|
||||||
if observer not in self._observers:
|
if observer not in self._observers:
|
||||||
self._observers.append(observer)
|
self._observers.append(observer)
|
||||||
|
|
||||||
def remove(self, observer):
|
def remove(self, observer):
|
||||||
"""removes an observer from observables"""
|
"""removes an observer from _observers"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self._observers.remove(observer)
|
self._observers.remove(observer)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
print(f"{observer} not in observers (ungridded)")
|
||||||
|
|
||||||
def get(self) -> list:
|
def get(self) -> list:
|
||||||
"""returns the current observables"""
|
"""returns the current _observers"""
|
||||||
|
|
||||||
return self._observers
|
return self._observers
|
||||||
|
|
||||||
def clear(self):
|
def clear(self):
|
||||||
"""clears the observables list"""
|
"""clears the _observers list"""
|
||||||
|
|
||||||
self._observers.clear()
|
self._observers.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user