Yes, that has come up before. If you are not creating the objects
dynamically, you can put the height/width detection inside a 'start'
block:
Shoes.app do
@s = stack( :height => 75, :width => 200 ) do
border black
para "This slot has some height and width, surely?"
end
start do
stack do
[ "@s.width = #[email protected]}", "@s.style[:width] = #[email protected][:width]}",
"@s.height = #[email protected]}",
"@s.style[:height] = #[email protected][:height]}" ].each { |x| para x }
end
end
end
On Fri, Jul 3, 2009 at 2:45 PM, Ehsanul Hoque<[email protected]> wrote:
> I can't seem to retrieve the height or width of a slot. GIves me 0 as the
> pixel height/width. Not sure if this is a bug in shoes (someone else must've
> noticed this by now) or just something with my system. Here's the code I've
> used to test it anyways, both on raisins and policeman, feel free to try it
> out and see if it gives you the expected result:
>
> Shoes.app do
> @s = stack( :height => 75, :width => 200 ) do
> border black
> para "This slot has some height and width, surely?"
> end
> stack do
> [ "@s.width = #[email protected]}", "@s.style[:width] = #[email protected][:width]}",
> "@s.height = #[email protected]}",
> "@s.style[:height] = #[email protected][:height]}" ].each { |x| para x }
> end
> end
>
> ________________________________
> Insert movie times and more without leaving Hotmail®. See how.
--
~devyn