diff --git a/ChangeLog b/ChangeLog index 49709f54cc..739d5a0cf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Thu Sep 1 14:12:45 2005 Hidetoshi NAGAI + + * ext/tk/lib/multi-tk.rb: On Tcl8.5, MultiTkIp#invoke_hidden doesn't + work (gives wrong order of arguments). + + * ext/tk/lib/multi-tk.rb: add MultiTkIp#invoke_hidden_on_namespace + to support '-namespace' option of 'interp invokehidden' command + on Tcl8.5. + Wed Aug 31 14:41:30 2005 NAKAMURA Usaku * win32/Makefile.sub (OPTFLAGS): default global optimization to diff --git a/ext/tk/lib/multi-tk.rb b/ext/tk/lib/multi-tk.rb index c82fa8f4e3..02beb8c677 100644 --- a/ext/tk/lib/multi-tk.rb +++ b/ext/tk/lib/multi-tk.rb @@ -2360,11 +2360,12 @@ class MultiTkIp else keys = [] end + keys << _slavearg(slave) if Tk::TCL_MAJOR_VERSION > 8 || (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) keys << '--' end - keys << _slavearg(slave) << cmd + keys << cmd keys.concat(args) @interp._invoke('interp', 'invokehidden', *keys) end @@ -2378,12 +2379,13 @@ class MultiTkIp else keys = [] end + keys << _slavearg(slave) keys << '-global' if Tk::TCL_MAJOR_VERSION > 8 || (Tk::TCL_MAJOR_VERSION == 8 && Tk::TCL_MINOR_VERSION >= 5) keys << '--' end - keys << _slavearg(slave) << cmd + keys << cmd keys.concat(args) @interp._invoke('interp', 'invokehidden', *keys) end @@ -2391,6 +2393,23 @@ class MultiTkIp __getip.invoke_hidden_on_global(slave, cmd, *args) end + def invoke_hidden_on_namespace(slave, ns, cmd, *args) + # for Tcl8.5 or later + if args[-1].kind_of?(Hash) + keys = _symbolkey2str(args.pop) + else + keys = [] + end + keys << _slavearg(slave) + keys << '-namespace' << TkComm._get_eval_string(ns) + keys << '--' << cmd + keys.concat(args) + @interp._invoke('interp', 'invokehidden', *keys) + end + def self.invoke_hidden_on_namespace(slave, ns, cmd, *args) + __getip.invoke_hidden_on_namespace(slave, ns, cmd, *args) + end + def mark_trusted(slave = '') @interp._invoke('interp', 'marktrusted', _slavearg(slave)) self diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 576ba3b1f4..c24f209703 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -4437,7 +4437,7 @@ end #Tk.freeze module Tk - RELEASE_DATE = '2005-08-10'.freeze + RELEASE_DATE = '2005-09-01'.freeze autoload :AUTO_PATH, 'tk/variable' autoload :TCL_PACKAGE_PATH, 'tk/variable'