This works .. is there any way I can improve it ?
app = Shoes.app do
@s0 = stack :scroll => true do
background red
100.times do
para "yay"
end
end
@s = stack
@height = 0
every(1) do
unless app.height == @height
@s.clear do
background lightblue
para app.width
para app.height
end
@s.move 0,(app.height - 100)
@s0.height = (app.height - 100)
@height = app.height
end
end
end
On Thu, Jan 29, 2009 at 1:17 PM, Sam Saffron <[email protected]> wrote:
> Thanks muchly, it will be a nice touch for my autotest plugin ...
>
> Can I ask the window to notify me when it resizes, or do I have to
> constantly poll it?
>
> On Thu, Jan 29, 2009 at 10:23 AM, Alexander Rakoczy <
> [email protected]> wrote:
>
>> Unfortunately, no. Well, not that I know of. The closest you can do
>> is use :attach => window on a slot to fix it to the window, then use
>> an event loop of sorts to ask for the window size, and move the slot
>> if necessary.
>>
>> On Wed, Jan 28, 2009 at 16:02, Sam Saffron <[email protected]> wrote:
>> > HI there !
>> >
>> > I was wondering if anyone know how I would go about docking a stack to
>> the
>> > bottom of the window, so it remains there when you resize the window.
>> >
>> > Thanks so much for your help
>> > Sam
>> >
>> >
>>
>>
>>
>> --
>> alexander rakoczy
>>
>
>