librelist archives

« back to archive

Shoes works...then fails.

Shoes works...then fails.

From:
Kurtis Rainbolt-Greene
Date:
2010-03-02 @ 15:47
http://pastebin.com/ACYnMu3b

All I get is a blank window.

More importantly, after a few uses Shoes stops taking :width => 1.0 as
"100%", and takes it as "1px".

-- 
Kurtis Rainbolt-Greene
Programmer, Writer, Designer
> 1-541-805-2263
> http://krainbolt-greene.selfip.net

Re: [shoes] Shoes works...then fails.

From:
i5m
Date:
2010-03-02 @ 17:16
Kurtis,

you need to give some widths, heights and position to the backgrounds (From
the manual "Backgrounds are actual elements, not styles"). I'm not sure
exactly what you are trying to achieve from the code sample, but something
like:

Shoes.app do
background red, :width => "100%", :height => 20
background blue, :width => 40, :height => 20, :top => 20
background yellow, :width  => 40, :height => 20, :top => 40
end

It's necessary to give the ":top" positions as otherwise the elements are
layered one on top of the other.

Or if you want them in stacks, then the stacks need a size:

Shoes.app do
stack :height => 20 do
background red, :width => "100%"
end
stack :height => 20 do
background blue, :width => 40
end
background yellow, :width  => 40, :height => 20, :top => 40
end

If you put some content in the stacks then they pick up a default size:

Shoes.app do
stack :width => "100%" do
background red
para "red"
end
stack :width => 40 do
background blue
para "blue"
end
stack :width => 40 do
background yellow
para "yellow"
end
end

Hope that's of some help.

i5m.


-----------------------
i5m.co.uk
GPG Key: 0xA18A602B


On Tue, Mar 2, 2010 at 3:47 PM, Kurtis Rainbolt-Greene <
thinkwritemute@gmail.com> wrote:

> http://pastebin.com/ACYnMu3b
>
> All I get is a blank window.
>
> More importantly, after a few uses Shoes stops taking :width => 1.0 as
> "100%", and takes it as "1px".
>
> --
> Kurtis Rainbolt-Greene
> Programmer, Writer, Designer
> > 1-541-805-2263
> > http://krainbolt-greene.selfip.net
>