1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* (IMPORTANT BUG FIX) scan of event keywords doesn't work on recent

versions of Tck/Tk
* (bug fix) initialize error of instance variable on TkComposite
* (bug fix) initialize error on encoding-system on MultiTkIp
* (bug fix) trouble on destroying widgets
* (new) add JP and EN version of Ruby/Tk widget demos


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2003-07-31 20:52:40 +00:00
parent 0cdf0d99c1
commit 75362fbd47
141 changed files with 19495 additions and 25 deletions

View file

@ -174,6 +174,8 @@ class MultiTkIp
@@DEFAULT_MASTER = self.allocate
@@DEFAULT_MASTER.instance_eval{
@encoding = []
@tk_windows = {}
@tk_table_list = []
@ -433,6 +435,8 @@ class MultiTkIp
fail ArgumentError, "expecting a Hash object for the 2nd argument"
end
@encoding = []
@tk_windows = {}
@tk_table_list = []
@ -792,6 +796,10 @@ end
# class methods to delegate to TclTkIp
class << MultiTkIp
def method_missing(id, *args)
__getip.send(id, *args)
end
def make_safe
__getip.make_safe
end
@ -1141,6 +1149,41 @@ class MultiTkIp
end
end
# encoding convert
class MultiTkIp
# from tkencoding.rb by ttate@jaist.ac.jp
alias __eval _eval
alias __invoke _invoke
private :__eval
private :__invoke
def encoding
@encoding[0]
end
def encoding=(enc)
@encoding[0] = enc
end
def _eval(cmd)
if @encoding[0] != nil
_fromUTF8(__eval(_toUTF8(cmd, @encoding[0])), @encoding[0])
else
__eval(cmd)
end
end
def _invoke(*cmds)
if defined?(@encoding[0]) && @encoding[0] != nil
cmds = cmds.collect{|cmd| _toUTF8(cmd, @encoding[0])}
_fromUTF8(__invoke(*cmds), @encoding[0])
else
__invoke(*cmds)
end
end
end
# end of MultiTkIp definition
MultiTkIp.freeze # defend against modification