How to pass a Rust function as a selector? #614
Labels
A-framework
Affects the framework crates and the translator for them
question
Further information is requested
Hello!
I use a little modified code that's based on examples from objc2-app-kit crate sources:
Just a trivial
AppDelegate
with menu builder. However, I hit troubles at this step:The
on_click: fn()
is a typical Rust function but I can't get how to pass it as a selector, toNSMenuItem
called it on click.Unfortunately, I couldn't find any examples. Could you explain, please, how I can make it?
The text was updated successfully, but these errors were encountered: