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)