Regarding to the "feature", here's the version treating the bug as a
feature ;)
class Cell3 < Shoes::Widget
def initialize(opts)
@width = opts[:width] - 1
@height = opts[:height] - 1
paint
end
def paint
fill(white)
stroke(black)
rect(0, 0, @width, @height)
end
end
Shoes.app do
cell3 :left => 100, :top => 100, :width => 100, :height => 100
end
In fact, I like it. And the funny thing noticed: 'top' and 'left'
readers are accessible from the superclass whereas 'width' and
'height' are not. Therefore I must use @width and @height fields.
regards :)
sw
Wiadomość napisana w dniu 2009-01-24, o godz. 20:12, przez Krzysztof
B. Wicher:
However I'm not sure is it a bug or a feature indeed.
I cannot tell myself ... let's ask _why :)
Pozdrowka
K.