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

Pause in beforeClose?

Participant ,
Jun 12, 2018 Jun 12, 2018

Copy link to clipboard

Copied

Hello,

I have and eventListener for beforeClose and in the called function I'm showing a non-modal dialog. I had a modal dialog before, but I have to change this now). With a modal dialog the function called by beforeClose was paused until the dialog was closed. With the non-modal dialog the application continues and the document is closed.

Is there any way to wait until the non-modal dialog is closed?

Thanks

Klaus

TOPICS
Scripting

Views

354

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
People's Champ ,
Jun 12, 2018 Jun 12, 2018

Copy link to clipboard

Copied

Actually I think that closing events aren't the kind of events you can mess with. You can certainly be notified but you cannot prevent its execution (unless I am wrong). So the scenario you are talking about is no surprise.

So depending of what you want to achieve, you may need to change your strategy.

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
Participant ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

Thanks - our extension is a kind of connection to another system. Before closing the document I'm sending previews of the document to our system and the user can 'check in' the document, he can select a workflow status etc. And I'm writing some informations as labels in the document.

So I like to show a dialog for the user, this dialog get's informations from our system using asynchronous communication and the asynchronous communication doesn't work with a modal dialog.

I can retrieve most of the informations I like to display in the dialog before opening it. But after closing the dialog I like to write the labels into the document and at this time it's already closed.

I think I'll find another way with a different strategy..

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
People's Champ ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

LATEST

Well in this case add a second eventlistener > afterClose. Everytime a doc is closed, use beforeClose to store doc path.

then on afterClose run dialog, reopen doc with no window and generate previews.

you might want to disable listeners during this phase so it doesn’t fire unnecessary callbacks.

eventually turn them on again.

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