librelist archives

« back to archive

simple-accordian

simple-accordian

From:
Hawley Waldman
Date:
2012-09-07 @ 02:32
When running simple-accordion I get some kind of infinite loop like thing 
(the window seems to be searching for the bottom, forever, and the 
scrollbar indicates a bottom that is further and further away).

Does this app from shoes-contrib work for other people?

I'm running on os 10.6.8, with the mac shoes package (downloaded 4 days ago).

I got a similar symptom when I was playing around trying to get a flow 
containing a line of buttons to stay attached to the bottom of a window. 

Any advice on this / how to pin a flow or stack to the bottom of a window?

sincerely,
hawley

Re: [shoes] simple-accordian

From:
ashbb
Date:
2012-09-07 @ 12:14
Hi Hawley,

I'm using Windows 7 and Shoes 3 (0.r1514).
I tried to run the simple-accordion from on built-in manual.
It worked like this:
http://www.rin-shun.com/shoes/red-shoes-simple-accordion.swf.html

Sorry, I don't have a Mac. Hope someone will confirm.

> how to pin a flow or stack to the bottom of a window?
Try out the following.

Shoes.app do
  flow bottom: 0, height: 100 do
    background green
    para 'hello'
  end
end

Regards,
ashbb

Re: [shoes] simple-accordian/ pinning a flow to bottom of window

From:
Hawley Waldman
Date:
2012-09-07 @ 13:41
Two other things,  

 1. If I don't specify a :height for the flow the window goes into the 
infinity loop.

2.  Where would I find out that I can define a flow's characteristics as 
you did ie
   flow  bottom: 0, height: 40

as well as the way that I thought I had to ie
  flow :bottom => 0, :height => 40

is this just standard ruby parsing these days/ is it shoes specific / is 
it expounded upon somewhere in the pickaxe?

grateful,
Hawley


> 
> > how to pin a flow or stack to the bottom of a window?
> Try out the following.
> 
> Shoes.app do
>   flow bottom: 0, height: 100 do
>     background green
>     para 'hello'
>   end
> end
> 
> Regards,
> ashbb

Re: [shoes] simple-accordian/ pinning a flow to bottom of window

From:
Eric Watson
Date:
2012-09-07 @ 14:19
On Sep 7, 2012, at 8:41 AM, Hawley Waldman wrote:

> 2.  Where would I find out that I can define a flow's characteristics as
you did ie
>   flow  bottom: 0, height: 40
> 
> as well as the way that I thought I had to ie
>  flow :bottom => 0, :height => 40
> 
> is this just standard ruby parsing these days/ is it shoes specific / is
it expounded upon somewhere in the pickaxe?

This is just standard ruby parsing (added in 1.9, which the current 
version of Shoes uses). These are two equivalent notations for a Ruby 
hash:

{ :bottom => 0, :height => 40 }
{ bottom: 0, height: 40 }

The colon-after notation only works with symbol keys, but that's a great 
fit for Shoes.

Eric

Re: [shoes] simple-accordian/ pinning a flow to bottom of window

From:
Hawley Waldman
Date:
2012-09-07 @ 14:40
Ah, beautiful. I thought it might be a 1.9 thing. My copy of pick axe is 
for 1.8.(2)

it's a slick notation, but I'll probably stick with the clunky way for a bit.


> 
> On Sep 7, 2012, at 8:41 AM, Hawley Waldman wrote:
> 
>> 2.  Where would I find out that I can define a flow's characteristics 
as you did ie
>>  flow  bottom: 0, height: 40
>> 
>> as well as the way that I thought I had to ie
>> flow :bottom => 0, :height => 40
>> 
>> is this just standard ruby parsing these days/ is it shoes specific / 
is it expounded upon somewhere in the pickaxe?
> 
> This is just standard ruby parsing (added in 1.9, which the current 
version of Shoes uses). These are two equivalent notations for a Ruby 
hash:
> 
> { :bottom => 0, :height => 40 }
> { bottom: 0, height: 40 }
> 
> The colon-after notation only works with symbol keys, but that's a great
fit for Shoes.
> 
> Eric

Re: [shoes] simple-accordian/ pinning a flow to bottom of window

From:
Eric Watson
Date:
2012-09-08 @ 13:09
On Sep 7, 2012, at 9:40 AM, Hawley Waldman <hawleyw@gmail.com> wrote:

> Ah, beautiful. I thought it might be a 1.9 thing. My copy of pick axe is
for 1.8.(2)

Mine, too ;)

> it's a slick notation, but I'll probably stick with the clunky way for a bit.

The hashrockets are easier to read sometimes, like

{ notation: :slick, language: :ruby }

Vs

{ :notation => :clunky, :language => :ruby }

Re: [shoes] simple-accordian/ pinning a flow to bottom of window

From:
ashbb
Date:
2012-09-08 @ 05:48
Hi Hawley,

> 1. If I don't specify a :height for the flow the window goes into the
infinity loop.
You found a bug again.
I confirmed this problem on my Windows 7 with Shoes 3 (0.r1514).

ashbb

Re: [shoes] simple-accordian

From:
Hawley Waldman
Date:
2012-09-07 @ 13:23
Ok, I've experientially learned something about flows and pinning to the 
bottom of a window, but I'm not clear on why it is the way it is.

This code does what I want (pins a bar/ flow to the bottom of a window):
#----------------------
Shoes.app do
    background yellow

   flow bottom: 0, height: 100 do
       background green
       para 'hello'
   end

   flow do
      para "first line\n"
      para "first line\n"
      para "first line\n"
   end
end
#---------------------
But if I flip around the order of creating the flows it does not work:

#----------------------------
Shoes.app do
    background yellow
   
   flow do
      para "first line\n"
      para "first line\n"
      para "first line\n"
   end

  flow bottom: 0, height: 100 do
       background green
       para 'hello'
    end
end
#----------------------------

Is there a reason that this is so, or is it a quirky bit of shoes?

-hawley

> > how to pin a flow or stack to the bottom of a window?
> Try out the following.
> 
> Shoes.app do
>   flow bottom: 0, height: 100 do
>     background green
>     para 'hello'
>   end
> end
> 
> Regards,
> ashbb

Re: [shoes] simple-accordian

From:
ashbb
Date:
2012-09-08 @ 05:40
Hi Hawley,

Oh, strange! I think you found a bug.
Thanks. But sorry, we can't fix it in Red Shoes... :(

ashbb

Re: [shoes] simple-accordian

From:
Hawley Waldman
Date:
2012-09-08 @ 11:26
Why can't the window shade bug  be fixed in red shoes?

Could you give me a summary of the current state of the many colors? 

I love the idea behind shoes and now that I've started using it I'm loving
the reality if shoes (except the bugs).  I can write in C (my degree in 
computer science is from 1987) and got a nice fuzzy nostalgic feeling when
I briefly poked around the code directory. So I'm not too scared of the 
code, although I've seen many a warning about it being especially 
"creative".  I tried to compile it last night but Cairo failed, so I need 
to look into the cause of that. 

Hawley 


On Sep 8, 2012, at 1:40, ashbb <ashbbb@gmail.com> wrote:

> Hi Hawley,
> 
> Oh, strange! I think you found a bug.
> Thanks. But sorry, we can't fix it in Red Shoes... :(
> 
> ashbb