[#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:3410] dialogue
From:
Tadayoshi Funaba <tadf@...>
Date:
1998-07-25 07:14:48 UTC
List:
ruby-dev #3410
ふなばです。
擬似コードでも書いてみると、気分くらいは伝わるかもしれないので、ちょっ
と書いてみようと思ったんですが、やっているうちに、ある程度までなら実装
できそうな気がしてきたので、一応、動くものを書いてみました。
dialog.tcl を参考にしましたが、いろいろ手を抜いています。
手を抜いたところは、protocol で、WM_DELETE_WINDOW を設定するところ (つ
かおうとしたら、None がないと怒られた)、focus に関して、それから、グラ
ブもこれで十分なのか判りません。他にもアヤシイところがありそうです。
ボタンの登録はその都度、 set_button メソッドでする、というふうにしてみ
ました。デフォルトボタンは set_default メソッドでおこなっています。
--Tadayoshi Funaba
# tkdialogue.rb (prototype): Written by Tadayoshi Funaba 1998
# $Id: tkdialogue.rb,v 1.1 1998/07/25 06:49:05 tadf Exp tadf $
require 'tk'
class TkDialogue < TkToplevel
def initialize
super()
@buttons = {}
@counter = 0
@default = nil
@result = -1
transient TkWinfo.toplevel(TkWinfo.parent(self))
bind 'Return', lambda {
@result = @buttons[@default]
@default.
configure('state'=>'active', 'relief'=>'sunken')
update 'idletasks'
after 100, lambda{destroy}}
grab
end
def set_button(w)
@buttons[w] = @counter
@counter += 1
w.command lambda {
@result = @buttons[w]
destroy}
end
def set_default(w)
@default = w
end
def wait
withdraw
update 'idletasks'
sw = TkWinfo.screenwidth(self)
sh = TkWinfo.screenheight(self)
dw = TkWinfo.reqwidth(self)
dh = TkWinfo.reqheight(self)
vx = TkWinfo.vrootx(TkWinfo.parent(self))
vy = TkWinfo.vrooty(TkWinfo.parent(self))
x = (sw - dw) / 2 - vx
y = (sh - dh) / 2 - vy
geometry "+#{x}+#{y}"
deiconify
wait_destroy
@result
end
end
if __FILE__ == $0 then
class TkSimplestDialogue < TkDialogue
def initialize
super()
w = TkButton.new(self, 'text'=>'OK').pack
set_button w
set_default w
end
end
class TkImitationDialogue < TkDialogue
def initialize
super()
title 'Question'
iconname 'Dialogue'
bot = TkFrame.new(self, 'relief'=>'raised', 'bd'=>1).
pack('side'=>'bottom', 'fill'=>'both')
top = TkFrame.new(self, 'relief'=>'raised', 'bd'=>1).
pack('side'=>'top', 'fill'=>'both', 'expand'=>1)
msg = TkLabel.
new(self,
'justify'=>'left',
'text'=>
%Q("tkdialog.rb" already exists.\nDo you want to overwrite it?),
'font'=>'-adobe-times-medium-r-normal--*-180-*').
pack('in'=>top, 'side'=>'right', 'expand'=>1, 'fill'=>'both',
'padx'=>'3m', 'pady'=>'3m')
bitmap = TkLabel.new(self, 'bitmap'=>'questhead').
pack('in'=>top, 'side'=>'left', 'padx'=>'3m', 'pady'=>'3m')
default = TkFrame.new(self, 'relief'=>'sunken', 'bd'=>1).
pack('in'=>bot, 'side'=>'left', 'expand'=>1,
'padx'=>'3m', 'pady'=>'2m')
button = TkButton.new(self, 'text'=>'OK').
pack('in'=>default, 'padx'=>'2m', 'pady'=>'2m')
set_button button
set_default button
button2 = TkButton.new(self, 'text'=>'Cancel').
pack('in'=>bot, 'side'=>'left', 'expand'=>1,
'padx'=>'2m', 'pady'=>'2m')
set_button button2
end
end
class TkTest < TkRoot
def initialize
super()
TkButton.
new(self,
'text'=>'simplest',
'command'=>lambda {
p TkSimplestDialogue.new.wait}).
pack
TkButton.
new(self,
'text'=>'imitation',
'command'=>lambda {
p TkImitationDialogue.new.wait}).
pack
TkButton.
new(self,
'text'=>'Quit',
'command'=>lambda{destroy}).
pack
end
end
TkTest.new
Tk.mainloop
end