主要内容

本页采用了机器翻译。点击此处可查看最新英文版本。

mlreportgen.ppt.MessageFilter 类

命名空间: mlreportgen.ppt

过滤器控制消息调度程序

描述

过滤消息调度程序所调度的消息。

mlreportgen.ppt.MessageFilter 类是一个 handle 类。

属性

全部展开

  • true - 传递所有消息。

  • false - 阻止所有消息。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: logical

仅为此 PPT 对象传递消息,指定为 PPT 对象。如果消息满足此 MessageFilter 对象指定的其他过滤条件,则仅从指定的 PPT 对象传递消息。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true
  • true - 传递错误消息。

  • false - 阻止错误消息。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: logical

  • true - 传递警告消息。

  • false - 阻止警告消息。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: logical

  • true - 传递进度消息。

  • false - 阻止进度消息。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: logical

传递或阻止调试消息,指定为逻辑。

  • true - 传递调试消息。

  • false - 阻止调试消息。

属性:

GetAccess
public
SetAccess
public
NonCopyable
true

数据类型: logical

示例

全部折叠

创建演示文稿。

import mlreportgen.ppt.*;
pre = Presentation("myPresentation.pptx");

创建侦听程序并将其添加到消息调度程序。

dispatcher = MessageDispatcher.getTheDispatcher;

dispatcher.Filter.ErrorMessagesPass = true;
dispatcher.Filter.ProgressMessagesPass = false;

l = addlistener(dispatcher,"Message", ...
@(src, evtdata) disp(evtdata.Message.formatAsText));

在打开之前创建消息并发送。

msg = ErrorMessage("Invalid slide",pre);
dispatch(dispatcher, msg);

open(pre);

在程序中创建一个错误并发送消息。然后打开演示文稿。

titleText = Text("This is a Title");
titleText.Style = {Bold};
replace(pre,"Title",titleText);

close(pre);

版本历史记录

在 R2015b 中推出