nsICommandLineRunner 编辑

The nsICommandLineRunner is an extension of nsICommandLine used to initialize command lines and run them by processing the comand line handlers.

toolkit/components/commandlines/public/nsICommandLineRunner.idlScriptable Please add a summary to this article.   Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0)

Inherits from: nsICommandLine

Method overview

void init(in long argc, in nsCharPtrArray argv, in nsIFile workingDir, in unsigned long state);
void run();
void setWindowContext(in nsIDOMWindow aWindow);

Attributes

AttributeTypeDescription
helpTextAUTF8StringProcess and combine the help text provided by each command-line handler. Read only.

Methods

init()

Called with the argc/argv combination passed to main. It assumes a native character set. On Windows the character set is UTF-8, not the native codepage.

void init(
  in long argc,
  in nsCharPtrArray argv,
  in nsIFile workingDir,
  in unsigned long state
);
Parameters
argc
The number of arguments being passed.
argv
An array storing pointers to the arguments
workingDir
Directory where the command will run. This is used to resolve file and URI paths.
state
The type of command line being processed. This is an nsICommandLine state flag.

run()

Processes the command-line handlers in the proper order, and calls nsICommandLineHandler.handle() on each.

void run();
Parameters

None.

Exceptions thrown
NS_ERROR_ABORT
Thrown when the handler aborts. All other errors thrown by handlers will be silently ignored.

setWindowContext()

Sets the windowContext parameter.

void setWindowContext(
  in nsIDOMWindow aWindow
);
Parameters
aWindow
The DOM window object which will be set. It is an nsIDOMWindow object.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:88 次

字数:4017

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文