Not sure if this is a bug or just an "undocumented feature", but using this following code:

Code:
dialog testdialog {
  title "Dialog -x"
  size -1 -1 53 19
  option dbu
  button "Close me!", 1, 8 4 37 12, ok
  button "OK", 2, 15 25 14 11, hide ok
}

on *:DIALOG:testdialog:sclick:1:{
  echo -a Closing dialog: $dname
  dialog -x $dname
  echo -a Closed dialog: $dname
}


Results with:
Code:
Closing dialog: testdialog
Closed dialog:

Which shows that for some reason $dname is emptied once a /dialog -x command is performed.

Tested on 6.16. shocked


You won't like it when I get angry.