Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
0

Does app.bind allow for multiple bindings?

Contributor ,
Apr 21, 2023 Apr 21, 2023

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.

TOPICS
SDK
912
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Contributor , Apr 21, 2023 Apr 21, 2023

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.

 

Translate
Adobe Employee ,
Apr 21, 2023 Apr 21, 2023

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 21, 2023 Apr 21, 2023

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.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
May 04, 2023 May 04, 2023
LATEST

Hi @Bruce Bullis, did you have time to test this? Just would like to hear a confirmation, before implementing a workaround šŸ˜…

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines