Type Method 型メソッド

current()

If a command is being executed in the current thread by Cocoa scripting's built-in Apple event handling, return the command. あるコマンドが現在のスレッドにおいてCocoaスクリプティングのもつ組み込みアップルイベント処理によって実行されているならば、そのコマンドを返します。

Declaration 宣言

class func current() -> NSScriptCommand?

Discussion 議論

A command is being executed in the current thread by Cocoa scripting's built-in Apple event handling if an instance of NSScriptCommand is handling an execute() message at this instant as the result of the dispatch of an Apple event. Returns nil otherwise. scriptErrorNumber and scriptErrorString messages sent to the returned command object will affect the reply event sent to the sender of the event from which the command was constructed, if the sender has requested a reply. コマンドは、現在のスレッドにおいてCocoaスクリプティングのもつ組み込みアップルイベント取り扱いによって実行されます、もしNSScriptCommandのインスタンスがexecute()メッセージをこの瞬間にアップルイベントの発送の結果として取り扱っているならば。そうでなければnilを返します。返されたコマンドオブジェクトに送られたscriptErrorNumberscriptErrorStringメッセージは、コマンドがそれから組み立てられたところのイベントのセンダーに送られる返答イベントに影響を及ぼします、もしセンダーが返答を要請されたならば。

A suspended command is not considered the current command. If a command is suspended and no other command is being executed in the current thread, current() returns nil. 待機したコマンドは、現在のコマンドとはみなされません。コマンドが待機させられるそして他のコマンドが現在のスレッドにおいて実行されているならば、current()nilを返します。