MATLAB MATLAB REPORT GENERATOR - RELEASE NOTES Guía de usuario Pagina 959

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 986
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 958
Display Report Generation Messages
13-107
2
Use the MessageDispatcher.Filter property to specify to display debug
messages.
dispatcher.Filter.DebugMessagesPass = true;
3
Add a listener using the MATLAB addlistener function. Specify the dispatcher
object, the source and event data, and a disp function that specifies the event data
and format to use for the message.
l = addlistener(dispatcher,'Message', ...
@(src, evtdata) disp(evtdata.Message.formatAsText));
4
Include a code to delete the listener. Place it after the code that generates the report.
delete(l);
This report displays debug messages.
import mlreportgen.dom.*;
d = Document('test','html');
dispatcher = MessageDispatcher.getTheDispatcher;
dispatcher.Filter.DebugMessagesPass = true;
l = addlistener(dispatcher,'Message', ...
@(src, evtdata) disp(evtdata.Message.formatAsText));
open(d);
p = Paragraph('Chapter ');
p.Tag = 'chapter title';
p.Style = { CounterInc('chapter'),...
CounterReset('table'),WhiteSpace('pre') };
append(p, AutoNumber('chapter'));
append(d,p);
close(d);
rptview('test','html');
delete(l);
Create and Display a Progress Message
This example shows how to create and dispatch a progress message. You can use a
similar approach for other kinds of messages, such as warnings.
Vista de pagina 958
1 2 ... 954 955 956 957 958 959 960 961 962 963 964 ... 985 986

Comentarios a estos manuales

Sin comentarios