MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Test for dialog existence

  • To: mathgroup at
  • Subject: [mg112704] Test for dialog existence
  • From: Chris Degnen <degnen at>
  • Date: Tue, 28 Sep 2010 06:01:47 -0400 (EDT)

Hi. Can anyone suggest how to test for the existence of a dialog?

In the example below a dialog is created containing a plot which can
be modified.  However it seems to be difficult to test whether the
dialog has been closed.

This creates the dialog:

CreateTestDialog::usage = "CreateTestDialog[] creates a test dialog";
CreateTestDialog[] :=
  Module[{}, n = 4;
    plot = Dynamic[
      ParametricPlot[{Sin[t], Sin[n t]}, {t, 0, 2 Pi}, Ticks -> None,
       ImageSize -> 100]]]];


And the plot can be modified by various means:

TestExample`TestDialog`Private`n = 8;

TestExample`TestDialog`Private`n = 2;

But how can I tell if the dialog has been closed?  The dynamic plot
object still shows as existing afterwards:


  • Prev by Date: Re: Histogram
  • Next by Date: Re: Histogram
  • Previous by thread: Re: RootSearch issue
  • Next by thread: Re: Test for dialog existence