Showing a Dialog while another one is active is broken
Hi,
Im having an issue with showing dialogs via the ScriptUI.
In a Dialog i have a button that opens another dialog.
Before my last indesign-update (CC 14.0.2) the second dialog would open and when i closed it, i could use the previous dialog window again.
Now after the update i would open the second dialog and close it again, i cant use the previous dialog. It doesnt react in any way so i have to restart indesign.
Do you guys have any ideas how to solve the "two simultaneous dialogs" by changing something in the code or should i head to the indesign uservoice forums?
I'm fairly new to Scripting, so it could be that i haven't found the optimal solution for the dialogs yet.
Code looks like this:
var myWindow = new Window("dialog", "Konfiguration");
var myButtonGroup = myWindow.add("group");
var config = myButtonGroup.add("button", undefined, "Einstellungen", {
name: "settings"
});
var Abbrechen = myButtonGroup.add("button", undefined, "Abbrechen", {
name: "cancel"
});
config.onClick = function() {
var myConfigWin = new Window("dialog", "Einstellungen");
var contentGruppe = myConfigWin.add("group");
contentGruppe.alignChildren = "left";
contentGruppe.orientation = "column";
var contentEintrag = contentGruppe.add("group");
var contentText = contentEintrag.add("edittext", [0, 0, 750, 500], "Test", {
multiline: true
});
contentText.characters = 20;
contentText.enabled = true;
var contentButtonGruppe = myConfigWin.add("group");
var contentPlatzhalter = contentButtonGruppe.add("statictext", [0, 0, 550, 0], "");
contentButtonGruppe.orientation = "row";
contentButtonGruppe.alignChildren = "right";
var closeConfig = contentButtonGruppe.add("button", undefined, "Abbrechen", {name: "cancel"});
closeConfig.onClick = function() {
myConfigWin.close();
}
myConfigWin.show();
}
myWindow.show();