From 818cf50ca33749e740b5e0e267bb8628149ddbba Mon Sep 17 00:00:00 2001 From: jared Date: Wed, 21 Jan 2026 09:46:47 -0500 Subject: [PATCH] Add constraints to ScrollView and update logs --- main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 4ed2c10..5cb5aff 100644 --- a/main.py +++ b/main.py @@ -72,6 +72,11 @@ class ItemSenseApp(NSObject): self.scroll_view.setDocumentView_(self.text_view) self.stack_view.addView_inGravity_(self.scroll_view, 2) + # Constraint: Give the scroll view a minimum height so it doesn't collapse + self.scroll_view.translatesAutoresizingMaskIntoConstraints = False + self.scroll_view.heightAnchor().constraintGreaterThanOrEqualToConstant_(150.0).setActive_(True) + self.scroll_view.widthAnchor().constraintEqualToAnchor_(self.window.contentView().widthAnchor(), constant=-20).setActive_(True) + self.text_view.setString_("Initializing camera...") # Capture Button @@ -192,7 +197,7 @@ class ItemSenseApp(NSObject): self.performSelectorOnMainThread_withObject_waitUntilDone_("handleError:", str(e), False) def handleResponse_(self, result): - print(f"OpenAI Response received") + print(f"OpenAI Response received: {result}") self.text_view.setString_(result) self.capture_button.setTitle_("Scan Another") self.capture_button.setEnabled_(True)