Skip to content

Conversation

@Xylez01
Copy link

@Xylez01 Xylez01 commented Jul 25, 2022

We've run into the issue that we have multiple plugins that depend on setting an event handler through NSAppleEventManager.shared().setEventHandler, the next one always overwriting the previous one.

We are looking into exposing the handler methods on those plugins so we can achieve something like this:

    public func handleURLEvent(_ event: NSAppleEventDescriptor, with replyEvent: NSAppleEventDescriptor) {
        HandlerA.instance.handleURLEvent(...)
        HandlerB.instance.handleURLEvent(...)
       // other handlers
    }

Please let me know what you think of this approach (or if you have any better ideas for our issue)

@Xylez01 Xylez01 changed the title Expose ProtocolHanlderPlugin so it's possible to call 'handleEventURL' for multiple plugins Expose ProtocolHandlerPlugin so it's possible to call 'handleEventURL' for multiple plugins Jul 25, 2022
@lijy91
Copy link
Member

lijy91 commented Aug 20, 2022

LGTM

@lijy91 lijy91 merged commit dd1e853 into leanflutter:main Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants