nsITransaction 编辑

editor/txmgr/idl/nsITransaction.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7

Method overview

void doTransaction();
boolean merge(in nsITransaction aTransaction);
void redoTransaction();
void undoTransaction();

Attributes

AttributeTypeDescription
isTransientbooleanThe transaction's transient state. This attribute is checked by the transaction manager after the transaction's Execute() method is called. If the transient state is false, a reference to the transaction is held by the transaction manager so that the transactions' undoTransaction() and redoTransaction() methods can be called. If the transient state is true, the transaction manager returns immediately after the transaction's doTransaction() method is called, no references to the transaction are maintained. Transient transactions cannot be undone or redone by the transaction manager. Read only.

Methods

doTransaction()

Executes the transaction.

void doTransaction();
Parameters

None.

merge()

Attempts to merge a transaction into "this" transaction. Both transactions must be in their undo state, doTransaction() methods already called. The transaction manager calls this method to coalesce a new transaction with the transaction on the top of the undo stack. This method returns a boolean value that indicates the merge result. A true value indicates that the transactions were merged successfully, a false value if the merge was not possible or failed. If true, the transaction manager will Release() the new transaction instead of pushing it on the undo stack.

boolean merge(
  in nsITransaction aTransaction
);
Parameters
aTransaction
The previously executed transaction to merge.
Return value

Missing Description

redoTransaction()

Executes the transaction again. Can only be called on a transaction that was previously undone. In most cases, the redoTransaction method will actually call the doTransaction() method to execute the transaction again.

void redoTransaction();
Parameters

None.

undoTransaction()

Restores the state to what it was before the transaction was executed.

void undoTransaction();
Parameters

None.

See also

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

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

发布评论

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

词条统计

浏览:59 次

字数:5303

最后编辑:8年前

编辑次数:0 次

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