Answered
afterPlace eventListeners - ungroup snippet error
Hi,
I would like to ungroup a snippet after dropping it in the page, unfortunately I have an error
"Error: Unable to remove the target of an active script event."

My code :
var myListener = app.eventListeners.add("afterPlace", doThisWhenAfterPlace, false);
function doThisWhenAfterPlace(myEvent) {
mySel = app.selection;
try{
mySel[0].ungroup();
}catch(e) {
alert(e)
}
}
If anyone has an idea how to solve this problem... 😉Regards
