How do I implement delegates?
zhenchaoli opened this issue · 2 comments
zhenchaoli commented
Hi!
This is not really an issue (or maybe it is?), but how do I implement an NSApplicationDelegate for example, and assign it to NSApp so that I can start responding to events?
paulrouget commented
Here is an example: https://github.com/paulrouget/servoshell/blob/73727c68758851313d12554a46dac24255fe6be4/src/platform/macos/app.rs
Delegate is set here: https://github.com/paulrouget/servoshell/blob/73727c68758851313d12554a46dac24255fe6be4/src/platform/macos/app.rs#L116
Hope that helps.
zhenchaoli commented
Yeah, definitely! Thanks @paulrouget