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):
|
||||
try:
|
||||
return self.manager.application()
|
||||
return self.manager.application
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class BrowserHandler(AbletonOSCHandler):
|
||||
|
||||
def _browser(self):
|
||||
try:
|
||||
return self.manager.application().browser
|
||||
return self.manager.application.browser
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class AbletonOSCHandler:
|
||||
|
||||
@property
|
||||
def song(self):
|
||||
return self.manager.song()
|
||||
return self.manager.song
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Registration helpers
|
||||
|
||||
+4
-4
@@ -184,7 +184,7 @@ class ViewHandler(AbletonOSCHandler):
|
||||
|
||||
def _show_clip_detail_view(self, params: tuple) -> None:
|
||||
try:
|
||||
app = self.manager.application()
|
||||
app = self.manager.application
|
||||
app.view.show_view("Detail/Clip")
|
||||
except Exception as 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:
|
||||
try:
|
||||
app = self.manager.application()
|
||||
app = self.manager.application
|
||||
app.view.show_view("Detail/DeviceChain")
|
||||
except Exception as e:
|
||||
logger.warning("show_device_detail_view: %s", e)
|
||||
@@ -200,7 +200,7 @@ class ViewHandler(AbletonOSCHandler):
|
||||
|
||||
def _focus_browser(self, params: tuple) -> None:
|
||||
try:
|
||||
app = self.manager.application()
|
||||
app = self.manager.application
|
||||
app.view.show_view("Browser")
|
||||
except Exception as e:
|
||||
logger.warning("focus_browser: %s", e)
|
||||
@@ -208,7 +208,7 @@ class ViewHandler(AbletonOSCHandler):
|
||||
|
||||
def _get_focused_document_view(self, params: tuple) -> Optional[tuple]:
|
||||
try:
|
||||
app = self.manager.application()
|
||||
app = self.manager.application
|
||||
view = app.view.focused_document_view
|
||||
return (view,)
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user