Photoshop: Scripting: Crashing when I try to close dialog windows sequentially

  • 1
  • Problem
  • Updated 3 months ago
  • In Progress
  • (Edited)
This code hangs at least the last 3 versions and Photoshop.var d = new Window ('dialog')d.onShow = function ()  {        var d1 = new Window ('dialog')        d1.onShow = function () {d1.close(); d.close ()}        d1.show()}d.show ()
The problem arises if we want to close child and parent window and the child window was created at one of the stages of creating the parent window (after the parent window became visible, but before the controls on it became available). If we create a child window before the parent has become visible - the problem does not arise. If we create a child window by pressing a button in the parent, the problem does not occur.
Photo of Dmitry Egorov

Dmitry Egorov

  • 2 Posts
  • 0 Reply Likes

Posted 3 months ago

  • 1
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 17063 Posts
  • 2904 Reply Likes
Thanks. I've asked engineering to invistigate.

var d = new Window ('dialog')d.onShow = function ()  {        var d1 = new Window ('dialog')        d1.onShow = function () {d1.close(); d.close ()}        d1.show()}d.show ()
Photo of Dmitry Egorov

Dmitry Egorov

  • 2 Posts
  • 0 Reply Likes
Other code options, when a child window is shown during the parent creation process, cause the same problem when trying to close both windows.