[#3156] Re: bignum of ruby11b9_28 — 助田 雅紀 <masaki.suketa@...>
助田です。
5 messages
1998/07/01
[#3210] experimental release 1.1b9_29 — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
9 messages
1998/07/03
[#3215] [BUG] a ||= 1 and a &&= 1 — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
6 messages
1998/07/05
[#3225] Ruby/Tk unofficial patch — NAGAI Hidetoshi <nagai@...>
永井@知能.九工大です.
6 messages
1998/07/07
[#3229] [BUG] ruby-mode.el — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
2 messages
1998/07/07
[#3234] sample of TkFont class — NAGAI Hidetoshi <nagai@...>
永井@知能.九工大です.
52 messages
1998/07/08
[#3241] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/09
永井@知能.九工大です.
[#3290] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/15
永井@知能.九工大です.
[#3291] Re: sample of TkFont class
— matz@... (Yukihiro Matsumoto)
1998/07/15
まつもと ゆきひろです
[#3307] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/16
永井@知能.九工大です.
[#3309] Re: sample of TkFont class
— matz@... (Yukihiro Matsumoto)
1998/07/16
まつもと ゆきひろです
[#3319] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/16
永井@知能.九工大です.
[#3321] Re: sample of TkFont class
— matz@... (Yukihiro Matsumoto)
1998/07/16
まつもと ゆきひろです
[#3324] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/16
永井@知能.九工大です.
[#3367] Re: sample of TkFont class
— Tadayoshi Funaba <tadf@...>
1998/07/22
ふなばです。
[#3369] Re: sample of TkFont class
— ttate@...
1998/07/22
立石@JAISTです。
[#3370] Re: sample of TkFont class
— Tadayoshi Funaba <tadf@...>
1998/07/22
ふなばです。
[#3371] Re: sample of TkFont class
— ttate@...
1998/07/23
立石@JAISTです。
[#3372] Re: sample of TkFont class
— Takahiro Maebashi <maebashi@...>
1998/07/23
前橋です。
[#3375] Re: sample of TkFont class
— Tadayoshi Funaba <tadf@...>
1998/07/23
ふなばです。
[#3377] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/23
永井@知能.九工大です.
[#3388] Re: sample of TkFont class
— Tadayoshi Funaba <tadf@...>
1998/07/23
ふなばです。
[#3391] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/23
永井@知能.九工大です.
[#3325] Re: sample of TkFont class
— Tadayoshi Funaba <tadf@...>
1998/07/16
ふなばです。
[#3330] Re: sample of TkFont class
— matz@... (Yukihiro Matsumoto)
1998/07/17
まつもと ゆきひろです
[#3332] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/17
永井@知能.九工大です.
[#3333] Re: sample of TkFont class
— NAGAI Hidetoshi <nagai@...>
1998/07/17
永井@知能.九工大です.
[#3237] [BUG] Thread.abort_on_exception — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
8 messages
1998/07/08
[#3244] Re: [BUG] Thread.abort_on_exception
— matz@... (Yukihiro Matsumoto)
1998/07/09
まつもと ゆきひろです
[#3253] Re: [BUG] Thread.abort_on_exception
— keiju@... (石塚圭樹 )
1998/07/09
けいじゅ@日本ラショナルソフトウェアです.
[#3258] Re: [BUG] Thread.abort_on_exception
— matz@... (Yukihiro Matsumoto)
1998/07/10
まつもと ゆきひろです
[#3238] [BUG] Thread.value — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
7 messages
1998/07/08
[#3261] [BUG] format(nil, arg) — gotoken@... (GOTO Kentaro)
ごとけんです
7 messages
1998/07/11
[#3268] pstore.rb — keiju@... (Keiju ISHITSUKA)
けいじゅ@日本ラショナルソフトウェアです.
5 messages
1998/07/12
[#3292] exprimental release 1.1b9_31 (hopefully final) — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
20 messages
1998/07/15
[#3293] Re: exprimental release 1.1b9_31 (hopefully final)
— Takahiro Maebashi <maebashi@...>
1998/07/15
前橋です。
[#3294] Re: exprimental release 1.1b9_31 (hopefully final)
— matz@... (Yukihiro Matsumoto)
1998/07/15
まつもと ゆきひろです
[#3295] Re: exprimental release 1.1b9_31 (hopefully final)
— Takahiro Maebashi <maebashi@...>
1998/07/15
前橋です。
[#3297] Re: exprimental release 1.1b9_31 (hopefully final)
— ttate@...
1998/07/15
立石@JAISTです。
[#3303] Re: exprimental release 1.1b9_31 (hopefully final)
— matz@... (Yukihiro Matsumoto)
1998/07/16
まつもと ゆきひろです
[#3306] Re: exprimental release 1.1b9_31 (hopefully final)
— Takahiro Maebashi <maebashi@...>
1998/07/16
前橋です。
[#3317] Re: exprimental release 1.1b9_31 (hopefully final)
— matz@... (Yukihiro Matsumoto)
1998/07/16
まつもと ゆきひろです
[#3311] REQUEST id2name — Shin-ichro Hara <sinara@...>
原です。
5 messages
1998/07/16
[#3336] Kanji treatment in String#inspect & mbctab definition — Inaba Hiroto <inaba@...>
String#inspectですが、現在(1.1c0)は0x80以上の文字コードをそのまま出力
7 messages
1998/07/17
[#3340] Re: Kanji treatment in String#inspect & mbctab definition
— matz@... (Yukihiro Matsumoto)
1998/07/17
まつもと ゆきひろです
[#3345] Re: Kanji treatment in String#inspect & mbctab definition
— Inaba Hiroto <inaba@...>
1998/07/18
From: matz@netlab.co.jp (Yukihiro Matsumoto)
[#3344] tk.rb patch (for ruby-1.1c0) — ttate@...
立石@JAISTです。
9 messages
1998/07/18
[#3351] Re: tk.rb patch (for ruby-1.1c0)
— NAGAI Hidetoshi <nagai@...>
1998/07/21
永井@知能.九工大です.
[#3352] Re: tk.rb patch (for ruby-1.1c0)
— matz@... (Yukihiro Matsumoto)
1998/07/21
まつもと ゆきひろです
[#3359] Re: tk.rb patch (for ruby-1.1c0)
— NAGAI Hidetoshi <nagai@...>
1998/07/21
永井@知能.九工大です.
[#3353] tk.rb and tkfont.rb — Takahiro Maebashi <maebashi@...>
前橋です。
8 messages
1998/07/21
[#3393] tk.rb patch — NAGAI Hidetoshi <nagai@...>
永井@知能.九工大です.
9 messages
1998/07/23
[#3399] Re: tk.rb patch
— matz@... (Yukihiro Matsumoto)
1998/07/24
まつもと ゆきひろです
[#3412] tk.rb — Tadayoshi Funaba <tadf@...>
ふなばです。
7 messages
1998/07/26
[#3427] grand renaming — matz@... (Yukihiro Matsumoto)
まつもと ゆきひろです
12 messages
1998/07/29
[#3428] Re: grand renaming
— WATANABE Hirofumi <watanabe@...>
1998/07/29
わたなべです.
[#3429] Re: grand renaming
— matz@... (Yukihiro Matsumoto)
1998/07/29
まつもと ゆきひろです
[#3430] Re: grand renaming
— 藤本尚邦 / Hisakuni FUJIMOTO <hisa@...>
1998/07/29
藤本です、こんにちは。
[ruby-dev:3191] TkAfter
From:
NAGAI Hidetoshi <nagai@...>
Date:
1998-07-02 06:16:36 UTC
List:
ruby-dev #3191
永井@知能.九工大です.
どうしようかなぁと思ってましたが,TkAfter を改修しました.
このメール末尾にパッチを添えておきます.
>>>>> "M" == Takahiro Maebashi <maebashi@iij.ad.jp> writes:
M> def initialize
M> @after = TkAfter.new(0, 1, proc {go})
M> end
M> def go
M> game.nextgen
M> update
M> if @goflag
M> @after.start
M> end
M> end
M> としてみたのですが、動かないのです。何か考え違いをしているでしょうか?
上記のような場合で,
--------------------------------------------------
def initialize
@after = TkAfter.new.set_start_proc(0,proc{go})
end
def go
game.nextgen
update
if @goflag
@after.restart
end
end
--------------------------------------------------
とできるようにしてみました.
なお,これは以前からですが,上記 @after.restart を
@after.start とすることはできません.
ループが動いている最中の start は複数のループを
生じさせてしまうためです.
とりあえず,手元にある例では問題なく動いているようですが,
よろしければテストをお願いします.
--
永井 秀利 (九工大 知能情報)
nagai@ai.kyutech.ac.jp
--- /usr/src/ruby-1.1b9_28/lib/tkafter.rb Tue Jun 23 13:14:59 1998
+++ ./tkafter.rb Thu Jul 2 15:04:50 1998
@@ -1,6 +1,6 @@
#
# tkafter.rb : methods for Tcl/Tk after command
-# 1998/06/23 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
+# 1998/07/02 by Hidetoshi Nagai <nagai@ai.kyutech.ac.jp>
#
require 'tk'
@@ -20,10 +20,9 @@
@after_id = nil
arg = Array(tk_split_list(arg))
obj_id = arg.shift
- return nil if Tk_CBTBL[obj_id] == nil; # canceled
- ret = _get_eval_string(Tk_CBTBL[obj_id].do_callback(*arg))
- Tk_CBTBL[obj_id].set_next_callback(*arg)
- ret
+ ex_obj = Tk_CBTBL[obj_id]
+ return nil if ex_obj == nil; # canceled
+ _get_eval_string(ex_obj.do_callback(*arg))
end
def TkAfter.info
@@ -37,7 +36,15 @@
# instance methods
###############################
def do_callback(*args)
- @current_proc.call(*args)
+ @in_callback = true
+ ret = @current_proc.call(*args)
+ if @set_next
+ set_next_callback(*args)
+ else
+ @set_next = true
+ end
+ @in_callback = false
+ ret
end
def set_callback(sleep, args=nil)
@@ -49,6 +56,7 @@
def set_next_callback(*args)
if @running == false || @proc_max == 0 || @do_loop == 0
Tk_CBTBL[@id] = nil ;# for GC
+ @running = false
return
end
if @current_pos >= @proc_max
@@ -56,6 +64,7 @@
@current_pos = 0
else
Tk_CBTBL[@id] = nil ;# for GC
+ @running = false
return
end
end
@@ -88,9 +97,11 @@
@id = format("a%.4d", Tk_CBID[0])
Tk_CBID[0] += 1
- @init_sleep=0
- @init_proc=nil
- @init_args=[]
+ @set_next = true
+
+ @init_sleep = 0
+ @init_proc = nil
+ @init_args = []
@current_script = []
@current_proc = nil
@@ -188,37 +199,56 @@
self
end
- def start(sleep=0, init_proc=nil, *init_args)
+ def set_start_proc(sleep, init_proc, *init_args)
+ if !sleep == 'idle' && !sleep.kind_of?(Integer)
+ fail format("%s need to be Integer", sleep.inspect)
+ end
+ @init_proc = init_proc
+ @init_args = init_args
+ self
+ end
+
+ def start(*init_args)
return nil if @running
Tk_CBTBL[@id] = self
@do_loop = @loop_exec
@current_pos = 0
- if !sleep == 'idle' && !sleep.kind_of?(Integer)
- fail format("%s need to be Integer", sleep.inspect)
+ argc = init_args.size
+ if argc > 0
+ sleep = init_args.shift
+ if !sleep == 'idle' && !sleep.kind_of?(Integer)
+ fail format("%s need to be Integer", sleep.inspect)
+ end
+ @init_sleep = sleep
end
+ @init_proc = init_args.shift if argc > 1
+ @init_args = init_args if argc > 0
- @init_proc = init_proc
- @init_args = init_args
- @current_sleep = @init_sleep = sleep
+ @current_sleep = @init_sleep
@running = true
- if init_proc
- if not init_proc.kind_of? Proc
- fail format("%s need to be Proc", init_proc.inspect)
+ if @init_proc
+ if not @init_proc.kind_of? Proc
+ fail format("%s need to be Proc", @init_proc.inspect)
end
- @current_proc = init_proc
- set_callback(sleep, init_args)
+ @current_proc = @init_proc
+ set_callback(sleep, @init_args)
+ @set_next = false if @in_callback
else
- set_next_callback(*init_args)
+ set_next_callback(*@init_args)
end
self
end
- def restart
+ def restart(*restart_args)
cancel if @running
- start(@init_sleep, @init_proc, @init_args)
+ if restart_args == []
+ start(@init_sleep, @init_proc, *@init_args)
+ else
+ start(*restart_args)
+ end
end
def cancel