Copy link to clipboard
Copied
I am building cep extension and I was wondering if it is possible to pass from extendscript context object to CEP context and then pass it back to extendscript context? Eg:
extendscript [object TrackItem] -> CEP (here some operations happends with the callback data, but not with the object and its properties) -> extendscript [object TrackItem]
currently I am passing along needed data the object:
{
> I was wondering if it is possible to pass from extendscript context object to CEP context and then
> pass it back to extendscript context?
Anything passed between JavaScript and ExtendScript has to be flatted to a string, to make it across the boundary.
>maybe stringifing the object via JSON and parsing it back?
Yep.
Copy link to clipboard
Copied
> I was wondering if it is possible to pass from extendscript context object to CEP context and then
> pass it back to extendscript context?
Anything passed between JavaScript and ExtendScript has to be flatted to a string, to make it across the boundary.
>maybe stringifing the object via JSON and parsing it back?
Yep.
Copy link to clipboard
Copied
I have tried using JSON to send clip object back to cep panel and from there managed to recieve it as [object Object] with the readonly properties (no methods)
how can i convert it back to [object TrackItem]?
Copy link to clipboard
Copied
I'm not sure you can; if you're trying to re-instantiate a trackItem from a bunch of JSON passed in from JavaScript, there's no guarantee that there will still be a corresponding trackItem available.
Recommendation: Work with ExtendScript objects, within ExtendScript.