Ruby 1.9.2 リファレンスマニュアル > ライブラリ一覧 > win32oleライブラリ > WIN32OLE_EVENTクラス

class WIN32OLE_EVENT

クラスの継承リスト: WIN32OLE_EVENT < Object < Kernel < BasicObject

Abstract

WIN32OLE_EVENT objects controls OLE event.

特異メソッド

message_loop

Translates and dispatches Windows message.

new(ole, event) -> WIN32OLE_EVENT

Returns OLE event object. The first argument specifies WIN32OLE object. The second argument specifies OLE event name.

ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')

インスタンスメソッド

on_event([event]) {...}

Defines the callback event. If argument is omitted, this method defines the callback of all events.

ie = WIN32OLE.new('InternetExplorer.Application')
ev = WIN32OLE_EVENT.new(ie, 'DWebBrowserEvents')
ev.on_event("NavigateComplete") {|url| puts url}
on_event_with_outargs([event]) {...}

Defines the callback of event. If you want modify argument in callback, you should use this method instead of WIN32OLE_EVENT#on_event.

unadvice

Methods

Classes