diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-17 08:58:21 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-03-17 08:58:21 +0000 |
| commit | b54db8568cae6f5be8b98977a82d11df2d5c8c73 (patch) | |
| tree | b7027454a641e7c51404b316cb9b0b28f66acd3d /ext/tk/lib | |
| parent | 8f043b64fb245bb4ce6748850f77e1ff48d97fa5 (diff) | |
| download | ruby-b54db8568cae6f5be8b98977a82d11df2d5c8c73.tar.gz ruby-b54db8568cae6f5be8b98977a82d11df2d5c8c73.tar.xz ruby-b54db8568cae6f5be8b98977a82d11df2d5c8c73.zip | |
2000-03-17
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib')
| -rw-r--r-- | ext/tk/lib/tk.rb | 8 | ||||
| -rw-r--r-- | ext/tk/lib/tktext.rb | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index c344a2bf8..107165f8b 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -1062,15 +1062,13 @@ module TkSelection tk_call 'selection', 'get', type end def TkSelection.handle(win, func, type=None, format=None) - id = install_cmd(func) - tk_call 'selection', 'handle', win.path, id, type, format + tk_call 'selection', 'handle', win.path, func, type, format end def handle(func, type=None, format=None) TkSelection.handle self, func, type, format end - def TkSelection.own(win, func=None) - id = install_cmd(func) - tk_call 'selection', 'own', win.path, id + def TkSelection.own(win=None, func=None) + window(tk_call 'selection', 'own', win, func) end def own(func=None) TkSelection.own self, func diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb index 7872e6a07..9e38db503 100644 --- a/ext/tk/lib/tktext.rb +++ b/ext/tk/lib/tktext.rb @@ -132,7 +132,7 @@ class TkText<TkTextWin WidgetClassName end - def self.new(*args) + def self.new(*args, &block) obj = super(*args){} obj.init_instance_variable obj.instance_eval &block if defined? yield |
