|
From: Masao M. <mu...@hi...> - 2004-02-02 16:16:50
|
Hi, On 02 Feb 2004 10:30:57 -0500 Archit Baweja <bi...@us...> wrote: > > * GladeXMLSugar > > Interesting. But I think it makes some restriction of the ids. > > e.g.) need to avoid the ids like as "class", "name", "new", > > "constants", .... > > So I don't apply this feature now. > > # And also I don't like the name, though it's a small issue. > > > > Well I couldn't think of any name at that moment, but I have a new one. > GladeXMLHelper. > > And there is also the question of how to actually use it. By that I mean we > could have it as :- > > 1) it is rightnow, a class (which btw should be a pure virtual class, I > don't know how to do that in Ruby as yet). > 2) We could make it a module which people can mixin and run the specified > method. Ruby doesn't have pure virtual class. Every object is Object. Class and Module are also Objects. So they inherit methods of Object. In this case, Module has similar problem. module Hoge def id; "hoge"; end end class Foo def initialize; p id;end end Foo.new class Bar include Hoge def initialize; p id; end end Bar.new > This will also help in that in the future, if we add more helper fucntions, > they can all go in this Helper module, for which people have to require (maybe?) > I'll try and get back to you on a new GladeXML#widget_names patch. I don't think to add helper functions to such as Helper classes/modules. It's enough to define them in GladeXML itself. Of course, #widget_names should be defined as GladeXML#widget_names not GladeXMLHelper#widget_names. -- .:% Masao Mutoh<mu...@hi...> |