Hi,
I use vtkWarningMacro in my C++ plugin to display complementary messages in the Output Messages window. While this is useful for debugging purposes, for informative messages I would prefer text in black and without the traceback info. Is it possible in ParaView?
Hi,
you may look at the vtkOutputWindow singleton then.
Actually the text will be green and not black, but this is the standard informative text in the Output Messages
Thank you, but it only prints to the terminal:
vtkNew<vtkOutputWindow> w;
w->DisplayErrorText("-----------------------------------------"); // same for DisplayDebugText
Yes, that is why I mentioned the singleton. You can get it with auto w = vtkOutputWindow::GetInstance() instead of creating your own.
Thanks, it works perfectly! How do I know when to use singleton objects?
Hopefully some class documentation mentions that. Otherwise, when a static method named GetInstance or similar exists, it often means that the class is intended to be used following the singleton pattern.
2 Likes