* ext/tk/lib/tk.rb: add methods for new features of latest Tcl/Tk8.5
* ext/tk/lib/tk/namespace.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
58f761cf82
commit
89e1e19083
@ -1,3 +1,9 @@
|
|||||||
|
Fri Jul 14 13:08:13 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tk.rb: add methods for new features of latest Tcl/Tk8.5.
|
||||||
|
|
||||||
|
* ext/tk/lib/tk/namespace.rb: ditto.
|
||||||
|
|
||||||
Fri Jul 14 02:30:12 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Fri Jul 14 02:30:12 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* lib/monitor.rb: document patch from Hugh Sasse <hgs at dmu.ac.uk>.
|
* lib/monitor.rb: document patch from Hugh Sasse <hgs at dmu.ac.uk>.
|
||||||
|
@ -2357,15 +2357,15 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
|
|||||||
end
|
end
|
||||||
|
|
||||||
def encoding_names
|
def encoding_names
|
||||||
tk_split_simplelist(tk_call('encoding', 'names'))
|
TkComm.simplelist(Tk.tk_call('encoding', 'names'))
|
||||||
end
|
end
|
||||||
|
|
||||||
def encoding_system
|
def encoding_system
|
||||||
tk_call('encoding', 'system')
|
Tk.tk_call('encoding', 'system')
|
||||||
end
|
end
|
||||||
|
|
||||||
def encoding_system=(enc)
|
def encoding_system=(enc)
|
||||||
tk_call('encoding', 'system', enc)
|
Tk.tk_call('encoding', 'system', enc)
|
||||||
end
|
end
|
||||||
|
|
||||||
def encoding_convertfrom(str, enc=nil)
|
def encoding_convertfrom(str, enc=nil)
|
||||||
@ -2389,6 +2389,16 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
|
|||||||
ret
|
ret
|
||||||
end
|
end
|
||||||
alias encoding_convert_to encoding_convertto
|
alias encoding_convert_to encoding_convertto
|
||||||
|
|
||||||
|
def encoding_dirs
|
||||||
|
# Tcl8.5 feature
|
||||||
|
TkComm.simplelist(Tk.tk_call_without_enc('encoding', 'dirs'))
|
||||||
|
end
|
||||||
|
|
||||||
|
def encoding_dirs=(dir_list) # an array or a Tcl's list string
|
||||||
|
# Tcl8.5 feature
|
||||||
|
Tk.tk_call_without_enc('encoding', 'dirs', dir_list)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
extend Encoding
|
extend Encoding
|
||||||
@ -2467,6 +2477,12 @@ else
|
|||||||
str
|
str
|
||||||
end
|
end
|
||||||
alias encoding_convert_to encoding_convertto
|
alias encoding_convert_to encoding_convertto
|
||||||
|
def encoding_dirs
|
||||||
|
nil
|
||||||
|
end
|
||||||
|
def encoding_dirs=(dir_array)
|
||||||
|
nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
extend Encoding
|
extend Encoding
|
||||||
@ -4581,7 +4597,7 @@ end
|
|||||||
#Tk.freeze
|
#Tk.freeze
|
||||||
|
|
||||||
module Tk
|
module Tk
|
||||||
RELEASE_DATE = '2006-07-13'.freeze
|
RELEASE_DATE = '2006-07-14'.freeze
|
||||||
|
|
||||||
autoload :AUTO_PATH, 'tk/variable'
|
autoload :AUTO_PATH, 'tk/variable'
|
||||||
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
autoload :TCL_PACKAGE_PATH, 'tk/variable'
|
||||||
|
@ -472,6 +472,20 @@ class TkNamespace < TkObject
|
|||||||
tk_call('namespace', 'tail', str)
|
tk_call('namespace', 'tail', str)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.upvar(namespace, *var_pairs)
|
||||||
|
tk_call('namespace', 'upvar', namespace, *(var_pairs.flatten))
|
||||||
|
end
|
||||||
|
def upvar(*var_pairs)
|
||||||
|
TkNamespace.inscope(@fullname, *(var_pairs.flatten))
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.get_unknown_handler
|
||||||
|
tk_tcl2ruby(tk_call('namespace', 'unknown'))
|
||||||
|
end
|
||||||
|
def self.set_unknown_handler(cmd = Proc.new)
|
||||||
|
tk_call('namespace', 'unknown', cmd)
|
||||||
|
end
|
||||||
|
|
||||||
def self.which(name)
|
def self.which(name)
|
||||||
tk_call('namespace', 'which', name)
|
tk_call('namespace', 'which', name)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user