[#39325] File.fnmatch の改良について — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

はじめまして、山本です。

18 messages 2004/03/05

[#39429] trial version of Ruby/Tk — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

18 messages 2004/03/23
[#39454] Re: trial version of Ruby/Tk — "Shirai,Kaoru" <shirai@...> 2004/03/31

白井です。

[#39460] Re: trial version of Ruby/Tk — Hidetoshi NAGAI <nagai@...> 2004/04/01

永井@知能.九工大です.

[#39465] Re: trial version of Ruby/Tk — "Shirai,Kaoru" <shirai@...> 2004/04/01

白井です。

[#39466] Re: trial version of Ruby/Tk — Hidetoshi NAGAI <nagai@...> 2004/04/01

永井@知能.九工大です.

[#39453] Re: int/int in Ruby2? — Masaaki Sakano <mas@...>

坂野 正明です。

36 messages 2004/03/31
[#39455] Re: int/int in Ruby2? — NISHIMATSU Takeshi <t-nissie@...> 2004/03/31

西松と申します.

[#39470] Re: int/int in Ruby2? — Masaaki Sakano <mas@...> 2004/04/01

坂野 正明です。

[#39473] Re: int/int in Ruby2? — matz@... (Yukihiro Matsumoto) 2004/04/01

まつもと ゆきひろです

[#39484] Re: int/int in Ruby2? — Masaaki Sakano <mas@...> 2004/04/03

坂野 正明です。

[#39528] Re: int/int in Ruby2? — "T Akutsu" <locrian@...> 2004/04/09

あくつです。なんかわくわくしてきだぞ。(^^;)

[ruby-list:39377] Re: win32oleで excel が終了しない

From: Yukimi Sake <yukimi_sake@...>
Date: 2004-03-16 15:59:37 UTC
List: ruby-list #39377
雪見酒です。
g-1@sc5.so-net.ne.jpさんの<200403161123.i2GBN9P19892@mail.sc5.so-net.ne.jp>から

>実際にはクラスメンバとして
>@excel = WIN32OLE.new.....
>としているので
>
>def exit
>  @excel.quit
>  while WIN32OLE.ole_free(@excel) > 0 do end
>end
>
>という感じなのですがこれが原因ではないですよね?

どこで
  @excel = WIN32OLE.new....
しているのでしょうか?

class Hoge
  attr :excel
  def initialize
    @excel=Win32OLE.new('Excel.Application')
  end
  
  def exit
    Win32OLE.ole_free(@excel) #Automationオブジェクトがインスタンス
                              #単一に生成されることが保証されていれ
                              #ばこれでもOK
  end
end

fuga=Hoge.new
fuga.excel.visible=true
  .
  .
fuga.excel.quit
fuga.exit

こんな感じなら大丈夫だと思うのですが。
Rubyから制御できないAutomationObjectを作っていませんか?
具体的なコードを示していただければ何かわかるかもしれません。

-- 
Yukimi Sake mailto:yukimi_sake@mbi.nifty.com
http://homepage3.nifty.com/Yukimi_Sake/


In This Thread

Prev Next