• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Does app.bind allow for multiple bindings?

Contributor ,
Apr 21, 2023 Apr 21, 2023

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.

TOPICS
SDK

Views

483

Translate

Translate

Report

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.

 

Votes

Translate

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

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?

Votes

Translate

Translate

Report

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

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.

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

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