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

Open Same InDesign Dialog Type Extension Multiple Times

New Here ,
Jun 24, 2018 Jun 24, 2018

Copy link to clipboard

Copied

Hello,

My situation is

1. I have an InDesign Extension of "Modal Dialog" type.

2. I want to open it and let it to open another instance of itself again, and again (Nested opening same Modal Dialog (Same Extension ID))

I tried below to open in script, but it can only open one Modal Dialog. When try open again from the dialog, it have no reaction.

var csInterface = new CSInterface();

var ret = csInterface.requestOpenExtension('com.example.TestPlugin.threadViewer');

Is it possible to open same dialog multiple times?

Any work around to solve this? (one thing i can think of is Define multiple dialog of different IDs in Manifest, but it's limited to the number of definition)

Thanks very much for any help.

Kind regards,

Roy

TOPICS
Scripting

Views

629

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

Community Expert , Jun 27, 2018 Jun 27, 2018

Hi,

A modal dialog takes all the user interaction for the application, you cannot do anything in the application until the modal dialog is finished processing. This is why the menus are greyed out and you can't interact with any other UI. In order for your approach to work you would need to follow the following process.

Open Dialog B

Get User Interaction that determines what Dialog C shows

Close Dialog B

Open Dialog C

Allow user to interact with Dialog C

Close Dialog C

As stated above by Loic.Aigon​ thi

...

Votes

Translate

Translate
Community Expert ,
Jun 24, 2018 Jun 24, 2018

Copy link to clipboard

Copied

Moving to InDesign Scripting

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
Community Expert ,
Jun 25, 2018 Jun 25, 2018

Copy link to clipboard

Copied

Hi,

I am a little confused as to why you would want multiple modal dialogs, as a once you have shown the dialog the user has to interact with that dialog before you can show/use any other User Interface elements.

Are you wanting the dialog to show after the user has interacted with the initial dialog but with different options?

Or

Are you wanting multiples of the dialog appearing at the same time?

Regards

Malcolm

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
New Here ,
Jun 25, 2018 Jun 25, 2018

Copy link to clipboard

Copied

Hi,

we want to use this dialog recursively, to display a tree structured content.

The modal dialog will display a tree node content, and if user click the child node of that node, a new dialog will come on top to show the child content, and possible click again and grandchild and so on.

Anyways to achieve this? Thanks

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
Community Expert ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Hi,

That should be achievable in a single dialog, are you using script ui?

but a model dialog has to be dismissed before another modal dialog can be shown, so you may be able to code the ability to have your dialog shown, then when they click a child node, it closes the original dialog and opens a new dialog with the child nodes data, and so forth, but I think that would be a lot of work to track, especially if you want to make your way back up the tree when the child node is finished being worked on.

Regards

Malcolm

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
New Here ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

I see you mentioned "model dialog has to be dismissed before another modal dialog can be shown"

I just did some testing to open a Modal Dialog from another Modal Dialog, it opened, but with assert popup saying below.

KeyBoard::OpenExternalModalWindow fAcquireModalDialogAndCursorState should be nil

With more assert failed when close the dialog like : Expression: !mModalWindows.empty()

Then extension Menu Item is grayed out, but the current opened extension still working fine.

Is that InDesign not allow to open Modal Dialog from a Modal Dialog (even each dialog have a seperate id)?

Main reason We try not to use HTML because the html popup size is limited to the panel size. we need a larger dialog..

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 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

That sounds like everything you wouldn't want to do in terms of user experience, doesn't it ?

But to answer your question, as IDs are unique and reference a specific extension, I don't see how you could duplicate the extension itself.

However as it's all HTML, it's likely that you could create nested popups that would mimick a similar scenario.

Still, I don't really see the point as an end-user, I would probably think it's annoying and lead me to extra clicks.

There is likely other options.

Nested popups

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
New Here ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Thanks for the suggestions.

Main reason We try not to use HTML because the html popup size is limited to the parent extension panel size. we need a larger dialog.

We'll only need 2 level Modal Dialog popup now, Panel A open Dialog B, Dialog B open Dialog C, so we can use 2 individually defined ModalDialog.

It looks we have to close the current Modal Dialog before opening another Modal Dialog. Not sure whether we have to close it before opening the 2nd Dialog. Any ideas?

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
Community Expert ,
Jun 27, 2018 Jun 27, 2018

Copy link to clipboard

Copied

LATEST

Hi,

A modal dialog takes all the user interaction for the application, you cannot do anything in the application until the modal dialog is finished processing. This is why the menus are greyed out and you can't interact with any other UI. In order for your approach to work you would need to follow the following process.

Open Dialog B

Get User Interaction that determines what Dialog C shows

Close Dialog B

Open Dialog C

Allow user to interact with Dialog C

Close Dialog C

As stated above by Loic.Aigon​ this would not be a good user experience as there would be a lot of clicking, and there would probably be a delay between the closing of dialog B and the opening of dialog C.

Back to your point about needing a larger dialog,  surely the panel can be resized to any size that is required ?

And why can you not use a modaless dialog as that would not have any of these problems?

Regards

Malcolm

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