Copy link to clipboard
Copied
I want to support CS6 in my panel, but I am pretty sure some of the functionality will not be available.
Is it possible to obtain current CEP version in runtime, so I could have some features CEP8 only, some CEP9 only?
I only see the host version available. Can you do a if (typeof event.data == "object") or "undefined" to determine if what you want is available? Other than that a table of CEP version to app + app.version should do the trick. Something you would have to build is the only option I see.
Copy link to clipboard
Copied
I only see the host version available. Can you do a if (typeof event.data == "object") or "undefined" to determine if what you want is available? Other than that a table of CEP version to app + app.version should do the trick. Something you would have to build is the only option I see.
Copy link to clipboard
Copied
To give a more concrete example. as far as I know, CEP9 now exposes access to brushes programmatically.
I would want to add a button to my panel UI to change brush, for example. But it should only be available on CEP9, not on CEP8.
I am not sure how can I test with typeof or checking of undefined, while I am in my html/js part, not in jsx part of the extension.
Say I would expose some of this information via events – fire an event if functionality is available. I still need to somehow test in jsx that feature is present.
The simplest solution I can think of – as you mentioned, a table that sets some features for CEP8, and others for CEP9. But to make it work, I need to somehow get which environment host supports at the moment.
My extension works 2015.5 to 2019, people running in 2015.5 should not see some of the features.
Copy link to clipboard
Copied
As far as I know, "brushes programmatically" is not a CEP function but a Photoshop function which the appVersion or app.version would tell you.