-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] NSMenuItem setTarget trouble #585
Comments
If you take a look at the The reason this worked in If there is a natural place that you can store the target at the end of the scope, I'd recommend you do that, otherwise it's probably fine to leak it manually using
There's a bit more documentation on menus in here, but yeah, it definitely is limited. |
Interesting how it can tell that it got deallocated instead of crashing. Calling forget on it seems to work, thanks. |
It's kinda like |
We also link to this documentation from the property setters themselves. This is a common point of confusion, see: - #585 - #606 - https://matrix.to/#/!SrJvHgAPHenBakQHSz:matrix.org/$OsgLE1-VtAZ5f383z_UoEpDyS7xDUk67xveA_zWvyZA?via=matrix.org
Hello. I am migrating my project to use objc2 from objc, and I am encountering an issue. I am building a menu bar on top of an egui/winit app, and after switching to objc2, the menu bar options are greyed out. This suggests that the internal check for whether the action exists failed. I'm not sure if there's a problem with the crate or if it's my oversight (the documentation here is sparse, and my understanding of obj-c isn't that great).
Here's the relevant parts of the code
The text was updated successfully, but these errors were encountered: