[#8168] {literal}#[]= — EGUCHI Osamu <eguchi@...>

えぐち@エスアンドイーです。

16 messages 1999/11/01
[#8172] Re: {literal}#[]= — matz@... (Yukihiro Matsumoto) 1999/11/01

まつもと ゆきひろです

[#8176] Multiple self assignment — Kazuhiro Yoshida <moriq.kazuhiro@...>

もりきゅうです。

35 messages 1999/11/01
[#8178] Re: Multiple self assignment — matz@... (Yukihiro Matsumoto) 1999/11/01

まつもと ゆきひろです

[#8212] Re: Multiple self assignment — Kazuhiro Yoshida <moriq.kazuhiro@...> 1999/11/02

もりきゅうです。

[#8213] Re: Multiple self assignment — matz@... (Yukihiro Matsumoto) 1999/11/03

まつもと ゆきひろです

[#8232] 例外を処理する 2 項演算子 — Kazunori NISHI <kazunori@...> 1999/11/05

西@九大です。

[#8233] Re: 例外を処理する 2 項演算子 — matz@... (Yukihiro Matsumoto) 1999/11/05

まつもと ゆきひろです

[#8236] Re: 例外を処理する 2 項演算子 — Kazuhiro Yoshida <moriq.kazuhiro@...> 1999/11/05

もりきゅうです。

[#8266] Re: 例外を処理する 2 項演算子 — EGUCHI Osamu <eguchi@...> 1999/11/07

えぐち@エスアンドイー です。

[#8269] Re: 例外を処理する 2 項演算子 — gotoken@... (GOTO Kentaro) 1999/11/07

In message "[ruby-dev:8266] Re: 例外を処理する 2 項演算子"

[#8271] Re: 例外を処理する 2 項演算子 — matz@... (Yukihiro Matsumoto) 1999/11/08

まつもと ゆきひろです

[#8274] Re: 例外を処理する 2 項演算子 — keiju@... (石塚圭樹) 1999/11/08

けいじゅ@日本ラショナルソフトウェアです.

[#8204] Re: [ruby-list:18281] Re: アクセス制御について — Shugo Maeda <shugo@...>

前田です。

12 messages 1999/11/02
[#8205] Re: [ruby-list:18281] Re: アクセス制御について — Shin-ichiro Hara <sinara@...> 1999/11/02

原です。

[#8315] Re: [ruby-list:18601] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — Kazunori NISHI <kazunori@...>

西@九大です。

37 messages 1999/11/15
[#8316] Re: [ruby-list:18601] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — matz@... (Yukihiro Matsumoto) 1999/11/15

まつもと ゆきひろです

[#8369] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — Koji Arai <JCA02266@...> 1999/11/18

新井です。

[#8374] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — matz@... (Yukihiro Matsumoto) 1999/11/18

まつもと ゆきひろです

[#8384] Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{} — Koji Arai <JCA02266@...> 1999/11/19

新井です。

[#8405] 1.4.3 (Re: Re: [REQ] [].grep(pat){} ==> [].grep(pat).collect{}) — matz@... (Yukihiro Matsumoto) 1999/11/24

[#8319] Re: Exception handling — Jun Adachi <adachi@...>

安達@沖データと申します。

21 messages 1999/11/16
[#8350] Re: Exception handling — Kazunori NISHI <kazunori@...> 1999/11/17

西@九大です。

[#8446] [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...>

西@九大です。

37 messages 1999/11/29
[#8449] Re: [REQ] {enumerable, integer, range}.rand — matz@... (Yukihiro Matsumoto) 1999/11/30

まつもと ゆきひろです

[#8463] Re: [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...> 1999/11/30

西@九大です。

[#8474] Re: [REQ] {enumerable, integer, range}.rand — matz@... (Yukihiro Matsumoto) 1999/12/01

まつもと ゆきひろです

[#8476] Re: [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...> 1999/12/01

西@九大です。

[#8487] Re: [REQ] {enumerable, integer, range}.rand — matz@... (Yukihiro Matsumoto) 1999/12/02

まつもと ゆきひろです

[#8494] Re: [REQ] {enumerable, integer, range}.rand — Kazunori NISHI <kazunori@...> 1999/12/02

西@九大です。

[#8451] new Hash (Re: [ruby-list:19043]) — Wakou Aoyama <wakou@...>

青山です。

18 messages 1999/11/30

[ruby-dev:8445] [PATCH] Ruby/Tk and ...

From: Koji Arai <JCA02266@...>
Date: 1999-11-29 15:52:54 UTC
List: ruby-dev #8445
新井です。

ライブラリのパッチをいくつか。

(その1) 先に、以下のパッチを報告します。既に ruby-listで誰か
        が報告してたものですが、 cvs diff とったら出てきたの
        で。

Index: sample/mine.rb
===================================================================
RCS file: /home/cvs/ruby/sample/mine.rb,v
retrieving revision 1.3
diff -u -p -u -r1.3 mine.rb
--- sample/mine.rb	1999/10/12 04:53:36	1.3
+++ sample/mine.rb	1999/11/29 14:58:28
@@ -81,7 +81,7 @@ class Board
     elsif y < 0 then 0
     elsif y >= @hi then 0
     else
-      @data[x*@wi+y]
+      @data[y*@wi+x]
     end
   end
   def count(x,y)
===================================================================

以下、本題。Ruby/Tkに関するパッチです。

以下のバージョンでのみ確認しました。

$ ruby -v -rtk -e 'p Tk::TCL_VERSION, Tk::TK_VERSION, Tk::JAPANIZED_TK'
ruby 1.4.3 (1999-11-24) [i586-linux]
"8.0"
"8.0"
true

(その2) entry ウィジェットにscrollcommandオプションはありま
        せん。たぶん、xscrollcommandですよね?

$ ruby -rtk -e 'TkEntry.new.scrollcommand proc {}'
/usr/local/lib/ruby/1.4/tk.rb:510:in `_invoke': unknown option "-scrollcommand" (RuntimeError)
        from /usr/local/lib/ruby/1.4/tk.rb:510:in `tk_call'
        from /usr/local/lib/ruby/1.4/tk.rb:1611:in `configure'
        from /usr/local/lib/ruby/1.4/tkentry.rb:19:in `scrollcommand'
        from /tmp/rba05996:1

(その3) entry ウィジェットのコマンド selection clear に引数
        はありませんでした。

Index: ext/tk/lib/tkentry.rb
===================================================================
RCS file: /home/cvs/ruby/ext/tk/lib/tkentry.rb,v
retrieving revision 1.3
diff -u -p -u -r1.3 tkentry.rb
--- ext/tk/lib/tkentry.rb	1999/08/24 08:21:56	1.3
+++ ext/tk/lib/tkentry.rb	1999/11/29 14:58:26
@@ -15,8 +15,8 @@ class TkEntry<TkLabel
   def create_self
     tk_call 'entry', @path
   end
-  def scrollcommand(cmd)
-    configure 'scrollcommand', cmd
+  def xscrollcommand(cmd=Proc.new)
+    configure_cmd 'xscrollcommand', cmd
   end
 
   def delete(s, e=None)
@@ -45,7 +45,7 @@ class TkEntry<TkLabel
     tk_send 'selection', 'adjust', index
   end
   def selection_clear
-    tk_send 'selection', 'clear', 'end'
+    tk_send 'selection', 'clear'
   end
   def selection_from(index)
     tk_send 'selection', 'from', index
===================================================================

で、ちょっと質問です。上記バグを確認しようと思っていろいろやっ
てたらよくわからない点がでてきたので。

$ head -999 hoge*
==> hoge.rb <==
autoload :Hoge, "hoge2.rb"
require "hoge2.rb"

class Hoge
  def hoge
  end
end
p Hoge.instance_methods

==> hoge2.rb <==
class Hoge
  def hoge2
  end
end

上記スクリプト(hoge.rbの方)を実行すると

$ ruby -v hoge.rb 
ruby 1.4.3 (1999-11-24) [i586-linux]
hoge.rb:7: warning: already initialized constant Hoge
["hoge"]

となります。["hoge", "hoge2"]を期待してたわけですが・・・

--
新井康司 (Koji Arai)

In This Thread

Prev Next