Re: Retrieving plug-in parameters in custom view in FxPlug 4
site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=xMtR9pB+rLOWx+ey0T5U3yt3FTW9BnIr3/RUluR70 KM=; b=qvnzyMroBBJThhuxVT9Y3StlzclQDob5yjs8/XX/9F5zcFu564DpkEIIF kSuB0iIcGHsA7IPCoc4rPjKema4CM2QyLAOcVIEdzdUrQ+FSCzDFW5witbrIGP3Y SB6MHURTLqWTDSPwJXBtCL6ZUg3xMiCpmpwzxSxU0JOcwejrag+YDYY9OsarQ78A grhc1/pIWN0OKzNml1RiUwkXZyc5TGJOQipvKclcP8BaGnLTqXd6cFNt570CZXFC 0KzShGDWmMZkcuPuvG5ql+wWA+18tz6l+4ijFTlpzZ3FH/8vyMV5VpKH0rg2bNvI g1J22KDc5ihtoxVWw19WXLafFcdGA== User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 On 19/05/2020 4:52 am, Garrick Meeker wrote: You also currently need to add any custom view to enable view bridging and get dialogs to show up. Darrin worked out an example filter to demonstrate this. I’ve filed a bug report to have this secret trick added to the official docs. It sounds like you already have a custom view, but otherwise this can be very confusing. On May 18, 2020, at 9:32 AM, Darrin Cardani via Pro-apps-dev <pro-apps-dev@lists.apple.com> wrote: Sergey, Answers inline below: On May 17, 2020, at 7:09 PM, Sergey via Pro-apps-dev <pro-apps-dev@lists.apple.com> wrote: Good day pro-apps-dev, We are in the process of porting our plug-in onto FxPlug 4 (right now we are still on v2.x) and we struggle with making the basic things work via XPC. Our plug-in has its own custom UI based on Qt which is triggered by a Push Button. I am following the FxSimpleColorCorrector example and have been able to create a custom view (just a regular rectangular NSView with a child NSButton; should you ask, I cannot use addPushButtonWithName for the purpose as its selector is handled in the background thread which is not suitable for UI tasks, its visual representation is not perfect either) You can always use -performSelectorOnMainThread: or dispatch_async(dispatch_get_main_queue(), …) to do things on the main UI thread. Now obviously, our custom dialog must be pre-filled with current values of the custom parameters. However the FxParameterRetrievalAPI_v6 seems to be inaccessible in the handler selector of the push button. The _apiManager apiForProtocol returns nil no matter what. Funny enough, in the FxSimpleColorCorrector example the FxParameterRetrievalAPI_v6 is accessible inside drawRect selector, but not accessible inside mouseDown (which is similar to my situation). Is there a reason why the interface is inaccessible in some selectors, but accessible in others? Can you suggest any solution/workaround? In general we have to be careful to keep data exchange between the host and the plug-in to a minimum to keep performance tolerable for users. So rather than allowing all selectors to be used during every plug-in call, we now have to be very selective and find creative ways to cache data on the plug-in, while still being careful to keep it up-to-date. It’s can be difficult to get right sometimes. One option right now would be to cache the data yourself for use later on. Since you get called to generate the custom data, you know every time it gets changed. That said, please file a feedback issue and we’ll look into it. Darrin Best regards, Sergey _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/dcardani%40apple.com This email sent to dcardani@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/garrick%40digitalanarch... This email sent to garrick@digitalanarchy.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com Thank you for the reply, Garrick. Yes, I've figured out that custom view is the key to making selectors execute in context of the UI thread without additional complications.
participants (1)
-
Sergey via Pro-apps-dev