summaryrefslogtreecommitdiffstats
path: root/ext/tk/lib/tk.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-14 04:10:51 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-07-14 04:10:51 +0000
commita902c2eae19198e715df33212c4ad7a65ba9a77f (patch)
tree31805c38af8ea33b1913f9adcdcbe77246a61d74 /ext/tk/lib/tk.rb
parent4fd9ec0bafbb389c5739f03ff18e6ca01f916c40 (diff)
downloadruby-a902c2eae19198e715df33212c4ad7a65ba9a77f.tar.gz
ruby-a902c2eae19198e715df33212c4ad7a65ba9a77f.tar.xz
ruby-a902c2eae19198e715df33212c4ad7a65ba9a77f.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@10531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r--ext/tk/lib/tk.rb24
1 files changed, 20 insertions, 4 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index 499cfce92..eefe4b555 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -2357,15 +2357,15 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
end
def encoding_names
- tk_split_simplelist(tk_call('encoding', 'names'))
+ TkComm.simplelist(Tk.tk_call('encoding', 'names'))
end
def encoding_system
- tk_call('encoding', 'system')
+ Tk.tk_call('encoding', 'system')
end
def encoding_system=(enc)
- tk_call('encoding', 'system', enc)
+ Tk.tk_call('encoding', 'system', enc)
end
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
end
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
extend Encoding
@@ -2467,6 +2477,12 @@ else
str
end
alias encoding_convert_to encoding_convertto
+ def encoding_dirs
+ nil
+ end
+ def encoding_dirs=(dir_array)
+ nil
+ end
end
extend Encoding
@@ -4581,7 +4597,7 @@ end
#Tk.freeze
module Tk
- RELEASE_DATE = '2006-07-13'.freeze
+ RELEASE_DATE = '2006-07-14'.freeze
autoload :AUTO_PATH, 'tk/variable'
autoload :TCL_PACKAGE_PATH, 'tk/variable'