Main Content

mlreportgen.ppt.MessageDispatcher.getTheDispatcher

Class: mlreportgen.ppt.MessageDispatcher
Namespace: mlreportgen.ppt

Return PPT message dispatcher

Description

example

mlreportgen.ppt.MessageDispatcher.getTheDispatcher returns the PPT message dispatcher. There is only one PPT message dispatcher per MATLAB® session.

Examples

expand all

This example shows how to return the PPT message dispatcher and use it to dispatch a progress message.

Add a dispatcher and listener to the report.

import mlreportgen.ppt.*;
pre = Presentation('myPresentation.pptx');
     
dispatcher = MessageDispatcher.getTheDispatcher;
l = addlistener(dispatcher,'Message', ...
      @(src, evtdata) disp(evtdata.Message.formatAsText));
     
dispatch(dispatcher,ProgressMessage...
('Empty presentation will be created',pre));
     
open(pre);
close(pre);
     
delete(l);

Check the progress messages in the MATLAB Command Window. The starting chapter message appears, in addition to the predefined PPT progress messages.

Version History

Introduced in R2015b