Re: Custom dialog during evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg111727] Re: Custom dialog during evaluation
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Wed, 11 Aug 2010 04:49:11 -0400 (EDT)
- References: <i3r0n8$dgn$1@smc.vnet.net>
Hi, > I would like to have a custom dialog appear while an evaluation is in > progress (maybe even add that familiar spinning flower). I know it is easy > for an experienced user to see when Mathematica is working, but this would > help novice users who use some of my notebooks. > > Does anyone have suggestions on how to do this? I can use CreateDialog, but > how do I close the dialog when the evaluation is done? DialogReturn only > seems to work if it is contained in the dialog, and if the entire evaluation > is contained in the CreateDialog, then the dialog doesn't appear until the > evaluation is complete. > > Any suggestions would be appreciated. Something like this? Button["Start Calculation", Module[{nb}, nb = CreateDialog[ Column[{"calculating ...", ProgressIndicator[Dynamic[Clock[Infinity]], Indeterminate]}]]; Pause[3];(*here goes the lengthy calculation*)NotebookClose[nb]];, Method -> "Queued"] hth, albert