Using MMA we often come across situations like the following
cityLIST = CityData[#, "Name"] & /@ CityData[];
This code if you evaluate will emit some display pane to the front end until evaluation finishes.
This is really nice functionality of MMA. Now when I want some of my time consuming code to have the same functionality I thought of Monitor or PrintTemporary. But is there a streamlined way to use this functions or anything similar (e.g some magical Internal`Bag, Internal`StuffBag) to achieve such dynamic message display that is not controlled by some artificial Pause[n] for some $n$ seconds? It will be best to have a general purpose code that works like the following for Module or Block constructs.
Module[{x,y,...<variables>}
code snippet I;
(* DynamicDisplayFunction must not affect the interdependent snippets I,II,..,n *)
DynamicDisplayFunction[code snippet II];
code snippet III;
.
.
code snippet n;
.
.
]
If such a function say DynamicDisplayFunction is viable then it should show some user defined temporary display to the front end while the MMA kernel evaluates the computationally cumbersome code snippet II part of the above Module.
While trying with monitor I ended up copying the design of the display but could not get rid of the disturbing Pause[].
data = {{0.18, -0.13}, {0.84, -0.06}, {0.05,0.88}, {0.24, -0.63},
{0.67, 0.93}, {0.05, 0.88}, {0.65,0.92}, {0.01, 0.99}, {0.17, -0.04},
{0.23, -0.55}};
model[{a_, k_, w_, p_}][x_] = a Exp[-k x] Sin[w x + p];
Module[{vars = {a, k, w, p}},
Monitor[FindFit[data, model[vars][x], vars, x,StepMonitor :> Pause[0.3]],
Grid[{{"Curve fitting results will be ready shortly...."}},
Frame -> All, FrameStyle -> Darker[Blend[{Blue, Green}], .1],
ItemStyle -> {FontFamily -> "Helvetica",
Directive[Darker[Blend[{Blue, Green}], .1], 11], None},
Background -> Lighter[Blend[{Blue, Green}], .9],
Spacings -> {4.9, 2.2}]
]
]

I doubt a bit if this type of question is fully correct in its own right as we know designing an observer for a certain system that does not affect the system itself, not even minutely, is very difficult. During a code evaluation making the kernel transmit some constant "Busy" message to the front end is it a simple job? I am also not sure if similar question is already addressed in the SE by some fellow members?

