36件ヒット
[1-36件を表示]
(0.071秒)
別のキーワード
クラス
- TracePoint (12)
-
WIN32OLE
_ EVENT (12) -
WIN32OLE
_ TYPE (12)
キーワード
-
default
_ event _ sources (12) - handler= (12)
検索結果
先頭3件
-
TracePoint
# event -> Symbol (18320.0) -
発生したイベントの種類を Symbol で返します。
...たイベントの種類を Symbol で返します。
発生するイベントの詳細については、TracePoint.new を参照してくださ
い。
@raise RuntimeError イベントフックの外側で実行した場合に発生します。
//emlist[例][ruby]{
def foo(ret)
ret
end
trace =......TracePoint.new(:call, :return) do |tp|
p tp.event
end
trace.enable
foo 1
# => :call
# :return
//}... -
WIN32OLE
_ TYPE # default _ event _ sources -> [WIN32OLE _ TYPE] (6640.0) -
型が持つソースインターフェイスを取得します。
...型が持つソースインターフェイスを取得します。
default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるイン......スを持
たない場合は空配列を返します。
tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]
WIN32OLE_EVENT.newでインターフェイス名を指定しない場合は、こ......ド呼び出し(=イベント通知)をトレースして調べるプ
ログラムです。イベントを受け付けるために、
WIN32OLE_EVENT.message_loopの呼び出しが必要な点に注意してください。
ここでは最終イベントのStatusTextChangeイベントのメッセ... -
WIN32OLE
_ EVENT # handler=(obj) -> () (3267.0) -
イベント処理を実行するオブジェクトを登録します。
...ければmethod_missingが呼ばれます。イベン
ト名は大文字小文字を区別するため、正確な記述が必要です。
@param obj イベントに対応するメソッドを持つオブジェクト。イベント受信を
解除するにはnilを指定します。
c......ementsByTagName('a').each do |e|
puts "#{e.innerHTML}=#{e.href}"
end
@completed = true
end
def method_missing(id, *args)
puts "event=#{id.to_s}, args=#{args.inspect}"
end
end
ie = WIN32OLE.new('InternetExplorer.Application.1')
event = WIN32OLE_EVENT.new(i......e, 'DWebBrowserEvents2')
event.handler = IeHandler.new
ie.Navigate2 'http://www.ruby-lang.org/ja/'
loop do
break if event.handler.completed
WIN32OLE_EVENT.message_loop
end
ie.Quit
WIN32OLE_EVENT#on_eventなどの呼び出しでブロックが登録されている場
合、そち...