Displaying 1 result from an estimated 1 matches for "parent_window".
2004 Apr 24
1
Keyword arguments?
...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 styl...