Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
SwiftUI equivalent of validateMenuItem(_:)
Hi Michael,
Thanks for your reply.
I did find the post you refer to myself as well a couple of days ago. Actually I wanted to post this link myself, but I did not yet, as I did not get things working. The (extensive) code example the Apple engineer posted looks promising, but in my code I could not get it to work: I did notice that as soon as I set the focusValue, my app goes haywire: my codebase has some NSViewControllerRepresentable's and the update method is called endlessly as soon as the Focusvalue is set. This causes my app to show the spinner and become unresponsive. I suspect it is a bug, but I am not sure. I posted a bug report to Apple, hoping they will ever read and fix it. In the meantime, I keep trying myself and I am hoping someone on this forum might come up with some great solution.
While I am at it: I think the demo code is the way to go, but it raised an additional question for me: suppose one has an embedded AppKit outlineView (or whatever) and want to update menu, for example because. that outline view has the focus on some selected items: how to (best) use "focus value" from within appkit?