From b9bdee95f10922c0f4adbb51d2496c63d7d1ecdc Mon Sep 17 00:00:00 2001 From: nagai Date: Wed, 8 Dec 2004 18:14:15 +0000 Subject: * ext/tcltklib/tcltklib.c (ip_init): set root-win title to "ruby" when the running script is '-e one-liner' or '-' (stdin). * ext/tcltklib/extconf.rb: add find_library("#{lib}#{ver}",..) for stub libs * ext/tk/lib/tk/textmark.rb: TkTextMarkCurrent and TkTextMarkAnchor have a wrong parent class. * ext/tk/lib/tk/dialog.rb: rename TkDialog2 --> TkDialogObj and TkWarning2 --> TkWarningObj (old names are changed to alias names) * ext/tk/lib/tk/dialog.rb: bug fix of treatment of 'prev_command' option and hashes for configuration * ext/tk/lib/tk/dialog.rb: add TkDialogObj#name to return the button name * ext/tk/lib/tk/radiobutton.rb: rename enbugged method value() ==> get_value() and value=(val) ==> set_value(val). * ext/tk/lib/tk/menu.rb: add TkMenu.new_menuspec * ext/tk/lib/tk/menu.rb: add alias (TkMenuButton = TkMenubutton, TkOptionMenuButton = TkOptionMenubutton) * ext/tk/lib/tk/event.rb: new method aliases (same as option keys of event_generate) for Event object * ext/tk/lib/tk/font.rb: configinfo returns proper types of values * ext/tk/lib/tk.rb: bind methods accept subst_args + block * ext/tk/lib/tk/canvas.rb: ditto * ext/tk/lib/tk/canvastag.rb: ditto * ext/tk/lib/tk/frame.rb: ditto * ext/tk/lib/tk/text.rb: ditto * ext/tk/lib/tk/texttag.rb: ditto * ext/tk/lib/tk/toplevel.rb: ditto * ext/tk/lib/tkextlib/*: ditto and bug fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tkextlib/treectrl/tktreectrl.rb | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'ext/tk/lib/tkextlib/treectrl/tktreectrl.rb') diff --git a/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb b/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb index 729007edfb..11f723a8ff 100644 --- a/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb +++ b/ext/tk/lib/tkextlib/treectrl/tktreectrl.rb @@ -743,16 +743,39 @@ class Tk::TreeCtrl marquee_visible() end - def notify_bind(obj, event, cmd=Proc.new, *args) + #def notify_bind(obj, event, cmd=Proc.new, *args) + # _bind([@path, 'notify', 'bind', obj], event, cmd, *args) + # self + #end + def notify_bind(obj, event, *args) + if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + cmd = args.shift + else + cmd = Proc.new + end _bind([@path, 'notify', 'bind', obj], event, cmd, *args) self end - def notify_bind_append(obj, event, cmd=Proc.new, *args) + #def notify_bind_append(obj, event, cmd=Proc.new, *args) + # _bind([@path, 'notify', 'bind', obj], event, cmd, *args) + # self + #end + def notify_bind_append(obj, event, *args) + if args[0].kind_of?(Proc) || args[0].kind_of?(Method) + cmd = args.shift + else + cmd = Proc.new + end _bind([@path, 'notify', 'bind', obj], event, cmd, *args) self end + def notify_bindremove(obj, event) + _bind_remove([@path, 'notify', 'bind', obj], event) + self + end + def notify_bindinfo(obj, event=nil) _bindinfo([@path, 'notify', 'bind', obj], event) end -- cgit v1.2.3