[#14715] HTTP Client with Ruby — TAKAHASHI Masayoshi <maki@...>
高橋征義です。
なひです.
高橋征義です。
ごとけんです
高橋です。みなさまどうもありがとうございます。
なひです.
前橋です。
なひです.
なひです.すいません,駄目です.^^;
なひです.
[#14747] Ruby-gtk の Text Widget について — Takano Naoki <takanon@...>
はじめまして。
[#14763] do end + do end — Wakou Aoyama <wakou@...>
青山です。
[#14765] ruby 1.3.4 with ipv6 — Yasunari Momoi <momo@...>
ruby 1.3.4 を入れたんですが,IPv6 対応しているんですね (^^).
[#14766] ruby 1.3.4 on BSD/OS 3.1 — Yasunari Momoi <momo@...>
BSD/OS 3.1 (with kame) で ruby-1.3.4 を作ろうとしているんで
まつもと ゆきひろです
前田です。
わたなべです.
[#14790] Microsoft Perl ? — ARIMA Yasuhiro <fit0298@...>
有馬です。
[#14833] Regacy scripts depend the ruby old version. — ARIMA Yasuhiro <fit0298@...>
有馬です。
[#14842] texinfo document for ruby-1.3 — Koji Arai <JCA02266@...>
新井です。
まつもと ゆきひろです
新井です。
From: Koji Arai <JCA02266@nifty.ne.jp>
[#14854] Rubyfaq-990607 — Akira Endo <akendo@...3.rim.or.jp>
遠藤です.
[#14863] OO Software Construction by Meyer — Akira Endo <akendo@...3.rim.or.jp>
遠藤です.
[#14874] ruby-gtk trouble — Jun Adachi <adachi@...>
安達@沖データと申します。
[#14900] Rubyfaq-990608 — Akira Endo <akendo@...3.rim.or.jp>
遠藤です.
まつもと ゆきひろです
[#14917] Ruby/Tk and Threads — Tomoyuki Kosimizu <greentea@...2.so-net.ne.jp>
こんにちは、越水です。
[#14953] 男親なら誰でも思う — 中村暁史 <anakamur@...>
[#14957] textarea with CGI.rb — HATTORI Masashi <hattori@...>
服部といいます。こんにちは。
[#14970] thread with curses — HATTORI Masashi <hattori@...>
服部といいます。こんにちは。
[#14980] 初期化メソッドの追加 — ARIMA Yasuhiro <fit0298@...>
有馬です。
[#15003] 文字列から数値への変換失敗を検出したい — ARIMA Yasuhiro <fit0298@...>
有馬です。
[#15012] ext ML の過去ログはいずこ? — 中村暁史 <anakamur@...>
原です。
akaishi です。
わたなべです.
前田です。
[#15045] mail library — Minero Aoki <aamine@...>
あおきです。
あおきです。
あおきです。
まつもと ゆきひろです
わたなべです.
まつもと ゆきひろです
石橋秀仁です.
あおきです。
まつもと ゆきひろです
あおきです。
なひです.
あおきです。
なひです.
松尾です。
なひです.
松尾です。
有馬@FITECです。
松尾です。
はじめまして、岩間です。
なひです.mod_rubyと格闘中です.
なひです.mod_rubyネタはruby-listでよいでしょうか?
前田です。
なひです.
なひです.
前田です。
なひです.
小松です。
前田です。
小松です。
前田です。
小松です。
前田です。
小松です。
まつもと ゆきひろです
たむら です。
あおきです。
まつもと ゆきひろです
あおきです。
まつもと ゆきひろです
あおきです。
[#15057] 複雑?な構造体の定義方法 — Koichi Shigematsu <shige@...>
しげまつ と申します。 とっても久しぶりの投稿です。
まつもと ゆきひろです
しげまつ です。
まつもと ゆきひろです
ごとけんです
まつもと ゆきひろです
ごとけんです
まつもと ゆきひろです
In message "[ruby-list:15078] Re: pattern (Re: 複雑?な構造体の定義方法)"
[#15093] String#rindex with arbitrary starting point — kjana@... (YANAGAWA Kazuhisa)
「String#rindex の第二引数ってば,探索を『始める』ポイントじゃなくて
前田です。
[#15112] pty on NeXTSTEP3.3J — SHIROYAMA Takayuki <psi@...>
[#15116] irb & ruby — Takashi Nishimoto <g96p0935@...>
ruby の最新版 (990625) を /usr/local 以下にインストールしたのですが、
[#15121] ruby-gtk-0.19 released — Hiroshi Igarashi <igarashi@...>
いがらし%Ruby/GTKメンテナ です。
From: Hiroshi Igarashi <igarashi@ueda.info.waseda.ac.jp>
いがらしです。
[#15131] game of life: ruby/gtk version — Takahiro Maebashi <maebashi@...>
前橋です。
[#15160] undefined method `-@' for Fixnum (NameError) — Tomoyuki Kosimizu <greentea@...2.so-net.ne.jp>
こんにちは、越水です。
まつもと ゆきひろです
[ruby-list:14843] Ruby/Tk TkText#dump
こんにちは、越水です。
tktext.rbのTkTextに, Tcl/Tkの`text dump'コマンドが実装されていないよう
なので、下のようなコードを書いてみました。将来、dumpが実装されることが
あれば参考にしてください:
require 'tk'
class TkTextDump <TkText
def _dump(type, *index)
str = tk_send('dump', type, *index)
result = []
sel = nil
i = 0
while i < str.size
# retrieve key
idx = str.index(/ /, i)
result.push str[i..(idx-1)]
i = idx + 1
# retrieve value
case result[-1]
when 'text'
if str[i] == ?{
# text formed as {...}
val, i = _retrieve_breathed_text(str, i)
result.push val
else
# text which may contain backslahes
val, i = _retrieve_backslashed_text(str, i)
result.push val
end
else
idx = str.index(/ /, i)
val = str[i..(idx-1)]
case result[-1]
when 'mark'
case val
when 'insert'
result.push TkTextMarkInsert.new(self)
when 'current'
result.push TkTextMarkCurrent.new(self)
else
result.push tk_tcl2rb val
end
when 'tagon'
if val == 'sel'
if sel
result.push sel
else
result.push TkTextTagSel.new(self)
end
else
result.push tk_tcl2rb val
end
when 'tagoff'
result.push tk_tcl2rb sel
when 'window'
result.push tk_tcl2rb val
end
i = idx + 1
end
# retrieve index
idx = str.index(/ /, i)
if idx
result.push str[i..(idx-1)]
i = idx + 1
else
result.push str[i..-1]
break
end
end
kvis = []
until result.empty?
kvis.push [result.shift, result.shift, result.shift]
end
kvis # result is [[key1, value1, index1], [key2, value2, index2], ...]
end
private :_dump
def _retrieve_breathed_text(str, i)
cnt = 0
idx = i
while idx < str.size
case str[idx]
when ?{
cnt += 1
when ?}
cnt -= 1
if cnt == 0
break
end
end
idx += 1
end
return str[i+1..idx-1], idx + 2
end
private :_retrieve_breathed_text
def _retrieve_backslashed_text(str, i)
j = i
idx = nil
loop {
idx = str.index(/ /, j)
if str[idx-1] == ?\\
j += 1
else
break
end
}
val = str[i..(idx-1)]
val.gsub!(/\\( |\{|\})/, '\1')
return val, idx + 1
end
private :_retrieve_backslashed_text
def dump_all(*index)
_dump('-all', *index)
end
def dump_mark(*index)
_dump('-mark', *index)
end
def dump_tag(*index)
_dump('-tag', *index)
end
def dump_text(*index)
_dump('-text', *index)
end
def dump_window(*index)
_dump('-window', *index)
end
end
txt = TkTextDump.new {
insert 'end', '0123456789'
pack
}
btn = TkButton.new {
text 'Get'
command {
txt.dump_all('1.0', 'end').each {
| key, value, index |
if key == 'text'
puts index + ': ' + value
end
}
}
pack
}
Tk.mainloop
# 越水 greentea@fa2.so-net.ne.jp