From 8716149eda470c3fbeffd8e287f8600474034204 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Wed, 20 Sep 2023 13:07:04 +0100 Subject: [PATCH] fixes attribute error --- src/nvda_voicemeeter/popup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/nvda_voicemeeter/popup.py b/src/nvda_voicemeeter/popup.py index ec0e0db..f3716f2 100644 --- a/src/nvda_voicemeeter/popup.py +++ b/src/nvda_voicemeeter/popup.py @@ -135,7 +135,7 @@ class Popup: self.logger.debug(f"values::{values}") if event in (psg.WIN_CLOSED, "Exit"): break - match parsed_cmd := self.parser.match.parseString(event): + match parsed_cmd := self.window.parser.match.parseString(event): case ["BUFFER MME" | "BUFFER WDM" | "BUFFER KS" | "BUFFER ASIO"]: if values[event] == "Default": if "MME" in event: @@ -147,10 +147,12 @@ class Popup: else: val = int(values[event]) driver = event.split()[1] - self.vm.set(f"option.buffer.{driver.lower()}", val) - self.TKroot.after(200, self.window.nvda.speak, f"{driver} BUFFER {val if val else 'default'}") + self.window.vm.set(f"option.buffer.{driver.lower()}", val) + self.window.TKroot.after( + 200, self.window.nvda.speak, f"{driver} BUFFER {val if val else 'default'}" + ) case [["BUFFER", driver], ["FOCUS", "IN"]]: - val = int(self.vm.get(f"option.buffer.{driver.lower()}")) + val = int(self.window.vm.get(f"option.buffer.{driver.lower()}")) self.window.nvda.speak(f"{driver} BUFFER {val if val else 'default'}") case [["BUFFER", driver], ["KEY", "SPACE" | "ENTER"]]: util.open_context_menu_for_buttonmenu(popup, f"BUFFER {driver}")