MathGroup Archive 2008

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

Search the Archive

Re: PrintTemporary

  • To: mathgroup at smc.vnet.net
  • Subject: [mg93126] Re: PrintTemporary
  • From: David Bailey <dave at Remove_Thisdbailey.co.uk>
  • Date: Mon, 27 Oct 2008 03:14:18 -0500 (EST)
  • References: <ge0t5r$76e$1@smc.vnet.net>

Hannes Kessler wrote:
> Hello all,
> 
> PrintTemporary[..] messages which are in fact notebook interface
> objects are not found by Cases[Notebooks[], _NotebookInterfaceObject].
> I would like to remove all of them at certain points as too many
> temporary messages are generated during the evaluation of several
> packages.
> 
> Of course, it would be possible to code
> 
> temporaryMessages = {};
> ...
> AppendTo[temporaryMessages, PrintTemporary["text 1"];
> ...
> AppendTo[temporaryMessages, PrintTemporary["text 2"];
> ...
> NotebookDelete  /@  temporaryMessages
> 
> But unfortunately I was too lazy to do that when I wrote the packages.
> Is there another possibility ?
> 
> Best regards,
> Hannes Kessler
> 
> 
The idea of PrintTemporary is, of course to print information that 
vanishes when an evaluation completes - typically some sort of progress 
information. The whole idea is that you don't have to clean the 
information out of your notebook!

 From what you have written, I wonder if your package is, in effect 
executing something equivalent to:

Print[PrintTemporary["Something"]]

This would print the temporary message and also produce a 
NotebookInterfaceObject[...]. The temporary messages would vanish after 
execution but the NotebookInterfaceObject's will remain. Make sure that 
each call to PrintTemporary in your package is followed by a semicolon.

David Bailey
http://www.dbaileyconsultancy.co.uk


  • Prev by Date: Re: reversing the direction of the X axis in Plot and ListPlot
  • Next by Date: Re: Is there a simple way to transform 1.1 to 11/10
  • Previous by thread: Re: PrintTemporary
  • Next by thread: Re: Export ListPlots using PlotMarkers to .pdf