From 79edd1af703289bfa827ac6418916ba28f490690 Mon Sep 17 00:00:00 2001 From: nagai Date: Wed, 25 Jun 2003 14:40:32 +0000 Subject: tk.rb : * add and modify : TkWidget.database_class, TkWidget.database_classname, TkWidget#database_class, TkWidget#database_classname * instances of a subclass of TkToplevel or TkFrame are created with ":class=>subclass" option as default. For example, the followings create similar objects. (1) TkFrame.new(:class=>'XXX') (2) class XXX < TkFrame; end; XXX.new sample/tkoptdb.rb : * add new part of sample script git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 121 insertions(+), 2 deletions(-) (limited to 'ext/tk/lib/tk.rb') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 6d8618a58a..74821f41c4 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -1501,6 +1501,10 @@ class TkBindTag bind(*args, &b) if args != [] end + def name + @id + end + def to_eval @id end @@ -3283,9 +3287,23 @@ class TkWindow