diff options
author | Yukihiro Matsumoto <[email protected]> | 1996-12-25 00:33:19 +0900 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2019-08-17 22:09:32 +0900 |
commit | ce930d042913722f209bbd3209b6c90a3c71325f (patch) | |
tree | 7233482f90335a8247ef426607622a8cad067a97 /lib | |
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 <[email protected]>
* 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')
-rw-r--r-- | lib/tk.rb | 18 | ||||
-rw-r--r-- | lib/tkcore.rb | 5 | ||||
-rw-r--r-- | lib/tkthcore.rb | 5 |
3 files changed, 15 insertions, 13 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 diff --git a/lib/tkcore.rb b/lib/tkcore.rb index df4af669ba..018e140ef0 100644 --- a/lib/tkcore.rb +++ b/lib/tkcore.rb @@ -185,7 +185,7 @@ after 120000 keepalive' end $tk_event_queue = [] - def tk_call(*args) + def tk_call(str, *args) args = args.collect{|s| next if s == None if s.kind_of?(Hash) @@ -204,7 +204,8 @@ after 120000 keepalive' "{#{s}}" end } - str = args.join(" ") + str += " " + str += args.join(" ") print str, "\n" if $DEBUG tk_write 'rb_ans %s', str while PORT.gets diff --git a/lib/tkthcore.rb b/lib/tkthcore.rb index adbad775d0..5e0abd72c5 100644 --- a/lib/tkthcore.rb +++ b/lib/tkthcore.rb @@ -109,7 +109,7 @@ module Tk val end - def tk_call(*args) + def tk_call(str, *args) Tk.init if $tk_not_init args = args.collect{|s| next if s == None @@ -129,7 +129,8 @@ module Tk "{#{s}}" end } - str = args.join(" ") + str += " " + str += args.join(" ") Qin.push str return Qout.pop end |