зеркало из https://github.com/github/ruby.git
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f1755966cc
Коммит
804054e672
|
@ -1,3 +1,12 @@
|
|||
Thu Sep 1 14:12:45 2005 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||
|
||||
* 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 <usa@ruby-lang.org>
|
||||
|
||||
* win32/Makefile.sub (OPTFLAGS): default global optimization to
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
Загрузка…
Ссылка в новой задаче