User`s guide
mlreportgen.dom.ProgressMessage.formatAsText
11-87
mlreportgen.dom.ProgressMessage.formatAsText
Package: mlreportgen.dom
Format message as text
Syntax
textMessageOut = formatAsText(message)
Description
textMessageOut = formatAsText(message) returns the message text formatted as
text.
Examples
Format a Message with White Spaces
This example uses formatAsText with the Web command to display the progress
messages.
import mlreportgen.dom.*;
doctype = 'html';
d = Document('test',doctype);
d.Tag = 'My report';
dispatcher = MessageDispatcher.getTheDispatcher;
l = addlistener(dispatcher,'Message', ...
@(src, evtdata) disp(evtdata.Message.formatAsText));
open(d);
dispatch(dispatcher,ProgressMessage('starting chapter',d));
p = Paragraph('Chapter ');
p.Tag = 'chapter title';
p.Style = { CounterInc('chapter'),...
CounterReset('table'),WhiteSpace('pre') };
append(p, AutoNumber('chapter'));