Copy link to clipboard
Copied
I was under impression that I can bind multilple functions to an event with "app.bind", e.g.:
app.bind('onSequenceActivated', test1)
app.bind('onSequenceActivated', test2)
function test1(){
alert("test1")
}
function test2(){
alert("test2")
}
However, only second function will be executed in the example above.
app.bind will overwrite previous app.bind.
Is that designed behaviour?
If yes, is there is a way to bind multiple functions to an event?
I rely on events in multiple extensions, but if user will use two of those extensions simultensouly, one will break another.
Thanks for the reply, Bruce.
From tests I can see that only most-recently-bound extension will get called. So if extension relies on one of Premiere events, another extension can just cancel its event subscription.
Copy link to clipboard
Copied
I'm unable to test right now (at a hockey tournament), but I wonder...
If you had two different extensions bind to the same message, do both extensions get called, or just the most-recently-bound extension?
Copy link to clipboard
Copied
Thanks for the reply, Bruce.
From tests I can see that only most-recently-bound extension will get called. So if extension relies on one of Premiere events, another extension can just cancel its event subscription.
Copy link to clipboard
Copied
Hi @Bruce Bullis, did you have time to test this? Just would like to hear a confirmation, before implementing a workaround 😅