-
Event listeners for dockable panels
So, I have a dockable panel and I need to update a text field in it if the name of the project changes, such as from untitled to a saved filename or if opening a different project or opening a new project (untitled), I want the dockable panel to update the text field.
Trouble is, I can’t seem to figure out how to trigger the change when these events occur.
The closest I’ve got is trying to add an event listener but I can’t get it to work.
For example, I’m trying to use:
var saveEL = app.project.addEventListener('afterSave', function(theEvent) {
alert('saved'); //here is where I'll run the update code
});
but that throws the error: “Function app.addEventListener is undefined”
I’ve also tried just app.addEventListener but same error.Hoping I’m missing the obvious?
I’m testing in AE 2018 currently.
Thank you for reading!
BC Canada