diff options
author | Yukihiro Matsumoto <matz@ruby-lang.org> | 1996-12-25 00:33:19 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-17 22:09:32 +0900 |
commit | ce930d042913722f209bbd3209b6c90a3c71325f (patch) | |
tree | 7233482f90335a8247ef426607622a8cad067a97 /lib/tk.rb | |
parent | 554b989ba1623b9f6a0b76f00824c83a23fbcbc1 (diff) |
version 1.0-961225v1_0_961225
https://cache.ruby-lang.org/pub/ruby/1.0/ruby-1.0-961225.tar.gz
Wed Dec 25 00:33:19 1996 Yukihiro Matsumoto <matz@caelum.co.jp>
* version 1.0-961225
* io.c (Init_IO): newを無効化
* lib/tkthcore.rb: tk_call "global $foo; set foo 5"などもできるように
* eval.c (thread_restore_context): $~, $_でスタックを壊していた
* process.c (rb_waitpid): threadに一応対応
Diffstat (limited to 'lib/tk.rb')
-rw-r--r-- | lib/tk.rb | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -486,12 +486,12 @@ class TkLabel<TkWindow tk_call 'label', @path end def textvariable(v) - v = v.id2name unless v.kind_of "String" + v = v.id2name unless v.kind_of? String vn = @path + v - vset = format("global {%s}; set {%s}", vn, vn) - tk_call vset, eval(v).inspect + vset = format("global {%s}; set {%s} %%s", vn, vn) + tk_write vset, eval(v).inspect trace_var v, proc{|val| - tk_call vset, val.inspect + tk_write vset, val.inspect } configure 'textvariable', vn end @@ -520,7 +520,7 @@ class TkRadioButton<TkButton tk_send 'select' end def variable(v) - v = v.id2name unless v.kind_of "String" + v = v.id2name unless v.kind_of? String if v =~ /^\$/ v = $' else @@ -528,13 +528,13 @@ class TkRadioButton<TkButton end vn = 'btns_selected_' + v trace_var v, proc{|val| - tk_call 'set', vn, val + tk_write 'global %s; set %s %s', vn, val } @var_id = install_cmd(proc{|name1,| - val = tk_call('set', name1) + val = tk_call(format('global %s; set', name1), name1) eval(format("%s = '%s'", v.id2name, val)) }) - tk_call 'trace variable', vn, 'w', @var_id + tk_call 'trace', 'variable', vn, 'w', @var_id configure 'variable', vn end def destroy @@ -732,7 +732,7 @@ module TkComposite def delegate(option, *wins) @delegates = {} if not @delegates @delegates['DEFAULT'] = @frame - if option.kind_of? String + if option.kind_of?(String) @delegates[option] = wins else for i in option |