[#26664] refactoring tcltklib.c (deleted ip check) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
山本です。
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
[#26711] --with-static-linked-extするとrequireできないライブラリがある — IWATSUKI Hiroyuki <don@...>
岩月と申します。
なかだです。
[#26721] TkVariable.new_hash 経由だと trace が発生しない — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
[#26723] Fixnum演算メソッド中のcoerceの削減 — Tadashi Saito <shiba@...2.accsnet.ne.jp>
斎藤と申します。
[#26743] zsuper in a method with optional arg — "NAKAMURA, Hiroshi" <nakahiro@...>
-----BEGIN PGP SIGNED MESSAGE-----
まつもと ゆきひろです
-----BEGIN PGP SIGNED MESSAGE-----
[#26745] TkCheckbutton#variable as getter? — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
永井@知能.九工大です.
山本です。
永井@知能.九工大です.
[#26753] some questions about tcltklib.c — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
永井@知能.九工大です.
山本です。
[#26764] multi-thread and logger — Nobuhiro IMAI <nov@...>
いまいです。
[#26791] Failure: test_block_passing(TestIterator) — Kazuhiro NISHIYAMA <zn@...>
西山和広です。
まつもと ゆきひろです
[#26800] reducing PUSH_TAG in rescue, and useless exceptions — nobu@...
なかだです。
[#26808] test/nkf/test_kconv.rb — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
[#26817] test/socket/test_tcp.rb freeze on windows — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
山本です。
こんにちは、なかむら(う)です。
山本です。
山本です。
こんにちは、なかむら(う)です。
山本です。
こんにちは、なかむら(う)です。
山本です。返信が遅れてすみません。
[#26829] cannot check EOF of pipe on windows — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
山本です。
こんにちは、なかむら(う)です。
山本です。
なかだです。
山本です。
こんにちは、なかむら(う)です。
なかだです。
こんにちは、なかむら(う)です。
なかだです。
こんにちは、なかむら(う)です。
山本です。
[#26840] [BUG] oniguruma + utf-8 — "NAKAMURA, Hiroshi" <nakahiro@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#26851] ripper for 1.8 — Tanaka Akira <akr@...17n.org>
ruby-1.8 で動かす gonzui で、ruby code の解析をしたいという要望があっ
[#26872] irb -I/ruby -Iと$LOAD_PATH — akira yamada / やまだあきら <akira@...>
Debianユーザからruby -Iとirb -Iで
なかだです。
nobuyoshi nakada wrote:
けいじゅ@いしつかです.
けいじゅ@いしつかです.
なかだです。
けいじゅ@いしつかです.
まつもと ゆきひろです
けいじゅ@いしつかです.
[#26883] top level include on load(filename, true) — Shugo Maeda <shugo@...>
前田です。
[#26897] fail on make install — KIMURA Koichi <kimura.koichi@...>
木村です。
こんにちは、なかむら(う)です。
木村です。
木村です。
木村です。
こんにちは、なかむら(う)です。
木村です。
こんにちは、なかむら(う)です。
なかだです。
山本です。
なかだです。
なかだです。
山本です。
こんにちは、なかむら(う)です。
なかだです。
まつもと ゆきひろです
山本です。
なかだです。
[#26900] multiplying empty string — nobuyoshi nakada <nobuyoshi.nakada@...>
まつもと ゆきひろです
In article <1125327516.070646.12845.nullmailer@x31.priv.netlab.jp>,
まつもと ゆきひろです
In article <1125356798.802509.8788.nullmailer@x31.priv.netlab.jp>,
まつもと ゆきひろです
In article <1125369966.174424.13781.nullmailer@x31.priv.netlab.jp>,
[ruby-dev:26686] Re: refactoring tcltklib.c (deleted ip check)
山本です。
>> tile 0.4 でまさにそういう状況でしたので、修正してコミットしました。
>
>そうでしたか.
>すみません.チェックしきれていませんでした.
ああ、いえ、[ruby-dev:26665] の私の書いたデモが tile 0.4 で動かなかった
ということでした。紛らわしくてすみません。
一応動くところまで行ったのですが、ライブラリにも変更が必要だったので
確認しておきます。これでいいでしょうか?
* autoload が働いていなかった: TreeView => Treeview (逆にすべき?)
* ary2tk_list がないといってエラーになった。ほかの場所では *items の
ように展開していたので、それに習った。
あと、Tk::Tile::Treeview の 'heading' コマンド相当を見つけられなかったので
Tk.tk_call で代用しました。それらしいクラスが上のほうにあるのですが、
使い方がわかりませんでした。
# なお、これはまだ tile 0.4 で動くようにできていません。tile 0.4 には
# ツリービューがないようなので、これから対処します。
Index: sample/tkextlib/tile/demo.rb
===================================================================
RCS file: /src/ruby/ext/tk/sample/tkextlib/tile/demo.rb,v
retrieving revision 1.6
diff -u -w -b -p -r1.6 demo.rb
--- sample/tkextlib/tile/demo.rb 1 Aug 2005 06:33:35 -0000 1.6
+++ sample/tkextlib/tile/demo.rb 1 Aug 2005 09:14:52 -0000
@@ -303,6 +303,8 @@ def makeNotebook
combo = Tk::Tile::TFrame.new(nb)
nb.add(combo, :text=>'Combobox', :underline=>7)
+ tree = Tk::Tile::TFrame.new(nb)
+ nb.add(tree, :text=>'Tree')
others = Tk::Tile::TFrame.new(nb)
nb.add(others, :text=>'Others', :underline=>4)
nb.add(Tk::Tile::TLabel.new(nb, :text=>'Nothing to see here...'),
@@ -310,10 +312,10 @@ def makeNotebook
nb.add(Tk::Tile::TLabel.new(nb, :text=>'Nothing to see here either.'),
:text=>'More Stuff', :sticky=>:se)
- [nb, client, combo, others]
+ [nb, client, combo, tree, others]
end
-nb, client, combo, others = makeNotebook()
+nb, client, combo, tree, others = makeNotebook()
#
# Side-by side check, radio, and menu button comparison:
@@ -556,6 +558,45 @@ values = %w(list abc def ghi jkl mno pqr
}
#
+# Treeview widget demo pane:
+#
+treeview = nil # avoid 'undefined' error
+scrollbar = Tk::Tile::TScrollbar.new(tree,
+ :command=>proc{|*args| treeview.yview(*args)})
+treeview = Tk::Tile::Treeview.new(tree, :columns=>%w(Class), :padding=>4,
+ :yscrollcommand=>proc{|*args| scrollbar.set(*args)})
+
+Tk.grid(treeview, scrollbar, :sticky=>'news')
+tree.grid_columnconfigure(0, :weight=>1)
+tree.grid_rowconfigure(0, :weight=>1)
+tree.grid_propagate(0)
+
+# Add initial tree node:
+# Later nodes will be added in <<TreeviewOpen>> binding.
+treeview.insert('', 0, :id=>'.', :text=>'Main Window', :open=>false,
+ :values=>[TkWinfo.classname('.')])
+Tk.tk_call(treeview, 'heading', '#0', :text=>'Widget')
+Tk.tk_call(treeview, 'heading', 'Class', :text=>'Class')
+treeview.bind('<TreeviewOpen>', proc{fillTree(treeview)})
+
+def fillTree(treeview)
+ id = treeview.focus_item
+ unless TkWinfo.exist?(id)
+ treeview.delete(id)
+ end
+ # Replace tree item children with current list of child windows.
+ treeview.delete(treeview.children(id))
+ for child in TkWinfo.children(id)
+ treeview.insert(id, :end, :id=>child, :text=>TkWinfo.appname(child),
+ :open=>false, :values=>[TkWinfo.classname(child)])
+ unless TkWinfo.children(child).empty?
+ # insert dummy child to show [+] indicator
+ treeview.insert(child, :end)
+ end
+ end
+end
+
+#
# Other demos:
#
$Timers = {:StateMonitor=>nil, :FocusMonitor=>nil}
Index: lib/tkextlib/tile.rb
===================================================================
RCS file: /src/ruby/ext/tk/lib/tkextlib/tile.rb,v
retrieving revision 1.8
diff -u -w -b -p -r1.8 tile.rb
--- lib/tkextlib/tile.rb 30 May 2005 14:53:45 -0000 1.8
+++ lib/tkextlib/tile.rb 1 Aug 2005 08:08:56 -0000
@@ -142,7 +142,7 @@ module Tk
autoload :TSquare, 'tkextlib/tile/tsquare'
- autoload :TreeView, 'tkextlib/tile/treeview'
+ autoload :Treeview, 'tkextlib/tile/treeview'
autoload :Style, 'tkextlib/tile/style'
end
Index: lib/tkextlib/tile/treeview.rb
===================================================================
RCS file: /src/ruby/ext/tk/lib/tkextlib/tile/treeview.rb,v
retrieving revision 1.3
diff -u -w -b -p -r1.3 treeview.rb
--- lib/tkextlib/tile/treeview.rb 9 Apr 2005 09:27:52 -0000 1.3
+++ lib/tkextlib/tile/treeview.rb 1 Aug 2005 08:58:47 -0000
@@ -129,17 +129,17 @@ class Tk::Tile::Treeview < TkWindow
list(tk_send_without_enc('children', item))
end
def children=(item, *items)
- tk_send_without_enc('children', item, ary2tk_list(items))
+ tk_send_without_enc('children', item, *items)
items
end
def delete(*items)
- tk_send_without_enc('delete', ary2tk_list(items))
+ tk_send_without_enc('delete', *items)
self
end
def detach(*items)
- tk_send_without_enc('detach', ary2tk_list(items))
+ tk_send_without_enc('detach', *items)
self
end
@@ -193,19 +193,19 @@ class Tk::Tile::Treeview < TkWindow
end
def selection_add(*items)
- tk_send_without_enc('selection', 'add', ary2tk_list(items))
+ tk_send_without_enc('selection', 'add', *items)
self
end
def selection_remove(*items)
- tk_send_without_enc('selection', 'remove', ary2tk_list(items))
+ tk_send_without_enc('selection', 'remove', *items)
self
end
def selection_set(*items)
- tk_send_without_enc('selection', 'set', ary2tk_list(items))
+ tk_send_without_enc('selection', 'set', *items)
self
end
def selection_toggle(*items)
- tk_send_without_enc('selection', 'toggle', ary2tk_list(items))
+ tk_send_without_enc('selection', 'toggle', *items)
self
end