ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.79k stars 65 forks source link

MenuItem's objc pointer is private #118

Closed 0123456789-jpg closed 4 months ago

0123456789-jpg commented 4 months ago

I recently found that the objc pointer held in cacao::appkit::menu::MenuItem is private when i want to do sth on the objc side. Does anyone know why it's private?

ryanmcgrath commented 4 months ago

I'm confused - are you talking about this?

https://github.com/ryanmcgrath/cacao/blob/e3bbb9366c8cf5a5474c5b134ae60e9641da3b7b/src/appkit/menu/item.rs#L93

I feel like you should be able to just match on that enum and handle accordingly.

0123456789-jpg commented 4 months ago

That's exactly what i want to say. My code works fine now. Thanks!