From: NAGAI Hidetoshi Date: 1998-06-26T10:28:39+09:00 Subject: [ruby-dev:3029] Re: experimental release 1.1b9_25 永井@知能.九工大です. tktext.rb の修正の依頼です. まずは前橋さんのメールにあった >>>>> "M" == Takahiro Maebashi writes: M> --- tktext.rb.old Thu Jun 18 16:47:09 1998 M> +++ tktext.rb Mon Jun 22 19:16:40 1998 M> @@ -148,8 +148,3 @@ M> def nextrange(first, last=nil) M> - l = tk_split_list(tk_call(@t.path, 'tag', 'nextrange', @id, first, last)) M> - r = [] M> - while key=l.shift M> - r.push [key, l.shift] M> - end M> - r M> + tk_split_list(tk_call(@t.path, 'tag', 'nextrange', @id, first, last)) M> end と同等の修正を prevrange にもお願いします. もう一つは,TkTextTag クラスに --------------------------------------------------------------------- def configinfo tk_split_list(tk_call(@t.path, 'tag', 'configure, @id)) end --------------------------------------------------------------------- の追加と,TkTextTag#configure を次のように修正してください. --------------------------------------------------------------------- def configure(key, val=nil) if key.kind_of? Hash tk_call @t.path, 'tag', 'configure, @id, *hash_kv(key) else tk_call @t.path, 'tag', 'configure, @id, "-#{key}", val end end --------------------------------------------------------------------- Hash でうけとるようになっていたので, 他のクラスの configure に合わせるようにしました. とはいえ,以前は Hash で受け取るようになっていたので, 互換性を考えて上記のようにしています. configure は複数オプションを一気に設定するものでもありますから, 逆に他のクラスでも Hash を受け取れるようにすべきという気もします. が,とりあえずこの点は保留してます. -- 永井 秀利 (九工大 知能情報) nagai@ai.kyutech.ac.jp