Post

Replies

Boosts

Views

Activity

Reply to NSHostingView doesn't work when used as an accessory view for NSOpenPanel
Here's the reproduction project: https://github.com/eidria/AccessoryViewTest.git Run the app in the debugger. When the window appears, you will see the accessory view presented inside the Content view. You can verify that all the controls function as expected, and that the App Model gets updated as intended. Now, click the button that shows the same view as an accessory view in a NSOpenPanel. Notice: The Text Field, Picker and Toggle configured as a switch all work as intended. The checkbox and button do not. If you clicked the button, notice that the button highlights when pressed, but the action takes place when the dialog is dismissed either through cancel or OK. Why aren’t checkboxes and buttons working in Accessory views? What can I do to get them to work?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25