cleaning up processes when ExtensionUnloaded
Dear ppro fellows,
I'm trying to kill processes spawned by my CEP panel after the panel is closed.
As specialists from this forum explained, to register the ExtensionUnloaded event from my CEP panel I need to have the invisibale custom CEP panel which starts when ppro starts.
Therefore:
Frist: in manifest.xml I added the second invisible extension and added to it:
<StartOn>
<Event>applicationActivate</Event>
<Event>com.adobe.csxs.events.ApplicationActivate</Event>
</StartOn>And indeed, as far as I understand, this invisible panel starts when ppro starts.
Second:
in my index.js of the invisible panel I'm listening for an
com.adobe.csxs.events.ExtensionUnloadedevent:
csInterface.addEventListener("com.adobe.csxs.events.ExtensionUnloaded", function(){
alert("Closed app");
});But then, strange thing happens. When I start my ppro
the "com.adobe.csxs.events.ExtensionUnloaded" is triggered somehow right on the start and I see this alert "Closed app".
Of course, when I close my visible CEP this alert is triggered again. But how can I get rid of this thing on the ppro start?
Is it because when ppro starts it unloads some panels and this alert is triggered by another unrelated to my extension event?
If so, is it possible to catch the unload event from my visible panel (with my ID) only?
Yaroslav.
