Fix song/application access: property not method call
ControlSurface exposes song and application as properties, not callable methods. Replace manager.song() and manager.application() with the correct attribute access throughout handler, application, browser, and view modules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ class ApplicationHandler(AbletonOSCHandler):
|
|||||||
|
|
||||||
def _app(self):
|
def _app(self):
|
||||||
try:
|
try:
|
||||||
return self.manager.application()
|
return self.manager.application
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class BrowserHandler(AbletonOSCHandler):
|
|||||||
|
|
||||||
def _browser(self):
|
def _browser(self):
|
||||||
try:
|
try:
|
||||||
return self.manager.application().browser
|
return self.manager.application.browser
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class AbletonOSCHandler:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def song(self):
|
def song(self):
|
||||||
return self.manager.song()
|
return self.manager.song
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# Registration helpers
|
# Registration helpers
|
||||||
|
|||||||
+4
-4
@@ -184,7 +184,7 @@ class ViewHandler(AbletonOSCHandler):
|
|||||||
|
|
||||||
def _show_clip_detail_view(self, params: tuple) -> None:
|
def _show_clip_detail_view(self, params: tuple) -> None:
|
||||||
try:
|
try:
|
||||||
app = self.manager.application()
|
app = self.manager.application
|
||||||
app.view.show_view("Detail/Clip")
|
app.view.show_view("Detail/Clip")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("show_clip_detail_view: %s", e)
|
logger.warning("show_clip_detail_view: %s", e)
|
||||||
@@ -192,7 +192,7 @@ class ViewHandler(AbletonOSCHandler):
|
|||||||
|
|
||||||
def _show_device_detail_view(self, params: tuple) -> None:
|
def _show_device_detail_view(self, params: tuple) -> None:
|
||||||
try:
|
try:
|
||||||
app = self.manager.application()
|
app = self.manager.application
|
||||||
app.view.show_view("Detail/DeviceChain")
|
app.view.show_view("Detail/DeviceChain")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("show_device_detail_view: %s", e)
|
logger.warning("show_device_detail_view: %s", e)
|
||||||
@@ -200,7 +200,7 @@ class ViewHandler(AbletonOSCHandler):
|
|||||||
|
|
||||||
def _focus_browser(self, params: tuple) -> None:
|
def _focus_browser(self, params: tuple) -> None:
|
||||||
try:
|
try:
|
||||||
app = self.manager.application()
|
app = self.manager.application
|
||||||
app.view.show_view("Browser")
|
app.view.show_view("Browser")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning("focus_browser: %s", e)
|
logger.warning("focus_browser: %s", e)
|
||||||
@@ -208,7 +208,7 @@ class ViewHandler(AbletonOSCHandler):
|
|||||||
|
|
||||||
def _get_focused_document_view(self, params: tuple) -> Optional[tuple]:
|
def _get_focused_document_view(self, params: tuple) -> Optional[tuple]:
|
||||||
try:
|
try:
|
||||||
app = self.manager.application()
|
app = self.manager.application
|
||||||
view = app.view.focused_document_view
|
view = app.view.focused_document_view
|
||||||
return (view,)
|
return (view,)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user