永井@知能.九工大です.

>>>>> "M" == Takahiro Maebashi <maebashi / iij.ad.jp> writes:
M> 1. TkFrame
M> -class オプションを指定することができない。-class は widget 生成時に
M> しか指定できないため。
M> 2. TkToplevel
M> これは -class, -screen が指定できるようになっているが動かない。

これらについてはこんなもんでしょうか?

-- 
                                         永井 秀利 (九工大 知能情報)
                                             nagai / ai.kyutech.ac.jp

--- tk.rb.new2	Tue Jul 21 17:08:18 1998
+++ tk.rb	Tue Jul 21 17:23:55 1998
@@ -1849,16 +1849,51 @@
   end
 
   def initialize(parent=nil, screen=nil, classname=nil, keys=nil)
-    @screen = screen if screen
-    @classname = classname if classname
+    if screen.kind_of? Hash
+      keys = screen.dup
+    else
+      @screen = screen
+    end
+    @classname = classname
+    if keys.kind_of? Hash
+      keys = keys.dup
+      if keys['classname']
+	@classname = keys['classname']
+	keys['classname'] = nil
+      end
+      if keys['colormap']
+	@colormap = keys['colormap']
+	keys['colormap'] = nil
+      end
+      if keys['container']
+	@classname = keys['container']
+	keys['classname'] = nil
+      end
+      if keys['screen']
+	@screen = keys['screen']
+	keys['screen'] = nil
+      end
+      if keys['use']
+	@use = keys['use']
+	keys['use'] = nil
+      end
+      if keys['visual']
+	@screen = keys['visual']
+	keys['visual'] = nil
+      end
+    end
     super(parent, keys)
   end
 
   def create_self
     s = []
-    s.push "-screen #@screen" if @screen 
-    s.push "-class #@classname" if @classname
-    tk_call 'toplevel', path, *s
+    s.push << "-class"     << @classname if @classname
+    s.push << "-colormap"  << @colormap  if @colormap
+    s.push << "-container" << @container if @container
+    s.push << "-screen"    << @screen    if @screen 
+    s.push << "-use"       << @use       if @use
+    s.push << "-visual"    << @visual    if @visual
+    tk_call 'toplevel', @path, *s
   end
 
   def specific_class
@@ -1872,8 +1907,37 @@
   def self.to_eval
     WidgetClassName
   end
+
+  def initialize(parent=nil, keys=nil)
+    if keys.kind_of? Hash
+      keys = keys.dup
+      if keys['classname']
+	@classname = keys['classname']
+	keys['classname'] = nil
+      end
+      if keys['colormap']
+	@colormap = keys['colormap']
+	keys['colormap'] = nil
+      end
+      if keys['container']
+      @classname = keys['container']
+	keys['classname'] = nil
+      end
+      if keys['visual']
+	@screen = keys['visual']
+	keys['visual'] = nil
+      end
+    end
+    super(parent, keys)
+  end
+
   def create_self
-    tk_call 'frame', @path
+    s = []
+    s.push << "-class"     << @classname if @classname
+    s.push << "-colormap"  << @colormap  if @colormap
+    s.push << "-container" << @container if @container
+    s.push << "-visual"    << @visual    if @visual
+    tk_call 'frame', @path, *s
   end
 end