るりまサーチ

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

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rubygems/defaults ruby_engine
  5. rake ruby

ライブラリ

クラス

検索結果

WIN32OLE_EVENT#handler=(obj) -> () (24243.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などの呼び出しでブロックが登録されている場
合、そちらが優先されます。...

WIN32OLE_TYPE#default_event_sources -> [WIN32OLE_TYPE] (6209.0)

型が持つソースインターフェイスを取得します。

...default_event_sourcesメソッドは、selfがCoClass(コンポーネントクラス)
の場合、そのクラスがサポートするデフォルトのソースインターフェイス(イ
ベントの通知元となるインターフェイス)を返します。

@
return デフォルト...
...ターフェイスを持
たない場合は空配列を返します。

tobj = WIN32OLE_TYPE.new('Microsoft Excel 14.0 Object Library', 'Worksheet')
tobj.default_event_sources.map {|intf| intf.name} #=> ["DocEvents"]

WIN32OLE_EVENT.newでインターフェイス名を指定しない...
...oding : cp932
r
equire 'win32ole'

type = WIN32OLE_TYPE.new('Microsoft Internet Controls', 'InternetExplorer')
ctl = WIN32OLE.new(type.progid)
source = type.default_event_sources[0]
class WebEvent
def initialize
@
completed = false
end
attr_reader :completed
end
source.ole_method...