summaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/tkextlib
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-02 21:05:17 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-08-02 21:05:17 +0000
commitbf272b43443c7b6a48aa6c03eb572bd0e61cbd21 (patch)
tree69557c022eb55181866149551356c7432c9de968 /ext/tk/sample/tkextlib
parent851a9c31e8e74cc5cfeef4aceab6b56cefadd973 (diff)
downloadruby-bf272b43443c7b6a48aa6c03eb572bd0e61cbd21.tar.gz
ruby-bf272b43443c7b6a48aa6c03eb572bd0e61cbd21.tar.xz
ruby-bf272b43443c7b6a48aa6c03eb572bd0e61cbd21.zip
* ext/tk/lib/tkextlib/tile/treeview.rb: Tk::Tile::Treeview#headingconfigure
is now working and more. [ruby-dev:26716] * ext/tk/sample/tkextlib/tile/demo.rb: use Tk::Tile::Treeview#headingconfigure instead of direct Tk.tk_call. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkextlib')
-rw-r--r--ext/tk/sample/tkextlib/tile/demo.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/tk/sample/tkextlib/tile/demo.rb b/ext/tk/sample/tkextlib/tile/demo.rb
index f04ba10c6..a8a350a2a 100644
--- a/ext/tk/sample/tkextlib/tile/demo.rb
+++ b/ext/tk/sample/tkextlib/tile/demo.rb
@@ -14,7 +14,10 @@ Tk.load_tclscript(File.join(demodir, 'repeater.tcl'))
# This forces an update of the available packages list. It's required
# for package names to find the themes in demos/themes/*.tcl
-Tk.tk_call(TkPackage.unknown_proc, 'Tcl', TkPackage.provide('Tcl'))
+## Tk.tk_call(TkPackage.unknown_proc, 'Tcl', TkPackage.provide('Tcl'))
+## --> This doesn't work.
+## Because, unknown_proc may be "command + some arguments".
+Tk.ip_eval("#{TkPackage.unknown_proc} Tcl #{TkPackage.provide('Tcl')}")
TkRoot.new{
title 'Tile demo'
@@ -574,8 +577,8 @@ if TkPackage.vcompare(Tk::Tile.package_version, '0.5') >= 0
# 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.headingconfigure('#0', :text=>'Widget')
+ treeview.headingconfigure('Class', :text=>'Class')
treeview.bind('<TreeviewOpen>', proc{fillTree(treeview)})
def fillTree(treeview)