Changing width to parent.width outputs 600 in both cases.

Kyle

On Feb 25, 2009, at 9:10 PM, Andre Nathan wrote:

Hi

I was trying to figure out how to center an image in my app, and I found
the following weird behaviour:

Shoes.app do
 stack do
   p width  # ok, prints 600
 end
end

but!

class Foo < Shoes
 url '/', :index
 def index
   stack do
     p width  # prints 0 :(
   end
 end
end
Shoes.app

Is this a bug? Is there a workaround for this in url-enabled apps?

Thanks,
Andre


Reply via email to