User`s guide
mlreportgen.dom.MessageEventData class
12-213
Properties
Id — ID for document element
string
A session-unique ID is generated as part of document element creation. You can specify
an ID to replace the generated ID.
Message — Message object (read-only)
message object
The value of this read-only property is a DOM message object, such as an
mlreportgen.dom.ProgressMessage object, that triggers a message event.
Tag — Tag for document element
string
Tag for document element, specified as a string.
A session-unique ID is generated as part of document element creation. The generated
tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value
of the Id property of the object. You can specify a tag to replace the generated tag.
Specify your own tag value, for example, to make it easier to identify where an issue
occurred during document generation.
Examples
Capture Message Event Data
When you add a dispatcher, the DOM API creates the evtdata object, which is an
mlreportgen.dom.MessageEventData object.
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));