diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-08 07:03:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-03-08 07:03:09 +0000 |
commit | d497898c231f124ba187e2650be8af20b47b1a97 (patch) | |
tree | d7fbdd608eb0698296838406ea964328994e342c /ext/tk/lib/tk.rb | |
parent | d41f53d0b6ceaec8b9fffc9f79ee9335b2a25175 (diff) | |
download | ruby-d497898c231f124ba187e2650be8af20b47b1a97.tar.gz |
* eval.c (cvar_cbase): utility function to find innermost non
singleton cbase.
* eval.c (is_defined): adopt new cvar behavior.
* eval.c (rb_eval): ditto.
* eval.c (assign): ditto.
* class.c (rb_mod_clone): should not call rb_obj_clone(), since
Module does not provide "allocate".
* class.c (rb_singleton_class): should crate new singleton class
if obj is a class or module and attached object is different,
which means metaclass of singleton class is sought.
* time.c (time_s_alloc): now follows allocation framework.
* eval.c (rb_eval): should initialize outer class variables from
methods in singleton class definitions.
* eval.c (assign): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk.rb')
-rw-r--r-- | ext/tk/lib/tk.rb | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index a16694bf76..a935a55e16 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -450,11 +450,11 @@ module TkComm end def pack(*args) - TkPack.configure *args + TkPack.configure(*args) end def grid(*args) - TkGrid.configure *args + TkGrid.configure(*args) end def update(idle=nil) @@ -495,18 +495,18 @@ module TkCore myid = _curr_cmd_id cmdid = install_cmd(cmd) tk_call("after",ms,cmdid) - return - if false #defined? Thread - Thread.start do - ms = Float(ms)/1000 - ms = 10 if ms == 0 - sleep ms/1000 - cmd.call - end - else - cmdid = install_cmd(cmd) - tk_call("after",ms,cmdid) - end +# return +# if false #defined? Thread +# Thread.start do +# ms = Float(ms)/1000 +# ms = 10 if ms == 0 +# sleep ms/1000 +# cmd.call +# end +# else +# cmdid = install_cmd(cmd) +# tk_call("after",ms,cmdid) +# end end def after_idle(cmd=Proc.new) @@ -620,6 +620,12 @@ module TkCore TclTkLib.mainloop end + def restart + TkCore::INTERP.restart + TkComm::Tk_WINDOWS.clear + nil + end + def event_generate(window, context, keys=nil) window = window.path if window.kind_of? TkObject if keys @@ -651,10 +657,11 @@ module TkCore end def tk_call(*args) - print args.join(" "), "\n" if $DEBUG + puts args.inspect if $DEBUG args.collect! {|x|ruby2tcl(x)} args.compact! args.flatten! + print "=> ", args.join(" ").inspect, "\n" if $DEBUG begin res = INTERP._invoke(*args) rescue NameError @@ -670,7 +677,7 @@ module TkCore if INTERP._return_value() != 0 fail RuntimeError, res, error_at end - print "==> ", res, "\n" if $DEBUG + print "==> ", res.inspect, "\n" if $DEBUG return res end end @@ -830,8 +837,8 @@ module Tk if bar @xscrollbar = bar @xscrollbar.orient 'horizontal' - self.xscrollcommand {|arg| @xscrollbar.set *arg} - @xscrollbar.command {|arg| self.xview *arg} + self.xscrollcommand {|arg| @xscrollbar.set(*arg)} + @xscrollbar.command {|arg| self.xview(*arg)} end @xscrollbar end @@ -839,8 +846,8 @@ module Tk if bar @yscrollbar = bar @yscrollbar.orient 'vertical' - self.yscrollcommand {|arg| @yscrollbar.set *arg} - @yscrollbar.command {|arg| self.yview *arg} + self.yscrollcommand {|arg| @yscrollbar.set(*arg)} + @yscrollbar.command {|arg| self.yview(*arg)} end @yscrollbar end |