るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.077秒)

別のキーワード

  1. encoding windows_31j
  2. _builtin windows_31j
  3. _builtin cswindows31j
  4. encoding cswindows31j
  5. json j

クラス

検索結果

WIN32OLE_EVENT#handler=(obj) -> () (6209.0)

イベント処理を実行するオブジェクトを登録します。

...@param obj イベントに対応するメソッドを持つオブジェクト。イベント受信を
解除するにはnilを指定します。

class IeHandler
def initialize
@completed = false
end
attr_reader :completed
def onDocumentComplete(disp, uri)...
...nerHTML}=#{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(ie, '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などの呼び出しでブロックが登録されている場
合、そちらが優先されます。...