Hi,
I just started playing with wxruby (0.3.0) and I
noticed that some of the widgets, e.g. Frame, take
quite a few arguments.
Any chance of providing keyword arguments? I don''t
necessarily mean a hash, but you could use the "yield
self if block_given?" trick. Instead of:
Frame.new(nil,-1,"Hello
World",Point.new(300,300),Size.new(300,150))
You could do:
Frame.new{ |f|
f.parent_window = false
f.identifier = -1
f.title = "Hello World"
f.position = Point.new(300,300)
f.size = Size.new(300,150)
f.style = "whatever"
}
This is easier to read. I also think you''re less
likely to make a mistake with this style of coding,
e.g. you won''t mix up size and position in this
example.
Whaddya think?
Regards,
Dan
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25ยข
http://photos.yahoo.com/ph/print_splash