diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-25 05:49:10 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-06-25 05:49:10 +0000 |
commit | 9a47a0460792a1c7447cff0dfe1059877da87be2 (patch) | |
tree | e1049c37508f683d974133eddfc03e09eb2558cb /ext/tk/lib/tk.rb | |
parent | f3d3cfb30dc3f8ea018ef23ae4295b10d8bdb963 (diff) |
tkcanvas.rb :
* Although requiring manual control of GC, memory eating problem
of TkCanvas Items is fixed. Probably, a time when GC should run
is only after removing many canvas items. GC's cost is large
and the man who knows proper timing to start GC is the man who
create the script. So, Ruby/Tk doesn't start GC automatically.
tktext.rb :
* add some methods and bug fix
tk.rb :
* add widget destroy hook binding to TkBindTag::ALL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r-- | ext/tk/lib/tk.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index d7531b2f8f..6d8618a58a 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -3088,7 +3088,9 @@ class TkObject<TkKernel begin cget name rescue - fail NameError, "undefined local variable or method `#{name}' for #{self.to_s}", error_at + fail NameError, + "undefined local variable or method `#{name}' for #{self.to_s}", + error_at end else fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at @@ -4773,6 +4775,15 @@ module TkClipboard end end +# widget_destroy_hook +require 'tkvirtevent' +TkBindTag::ALL.bind(TkVirtualEvent.new('Destroy'), proc{|widget| + if widget.respond_to? :__destroy_hook__ + widget.__destroy_hook__ + end + }, '%W') + +# autoload autoload :TkCanvas, 'tkcanvas' autoload :TkImage, 'tkcanvas' autoload :TkBitmapImage, 'tkcanvas' @@ -4789,7 +4800,6 @@ autoload :TkAfter, 'tkafter' autoload :TkTimer, 'tkafter' autoload :TkPalette, 'tkpalette' autoload :TkFont, 'tkfont' -autoload :TkVirtualEvent, 'tkvirtevent' autoload :TkBgError, 'tkbgerror' autoload :TkManageFocus, 'tkmngfocus' autoload :TkPalette, 'tkpalette' |