Re: Learning Shoes - Have some questions!

Hi Ruby S.,

I tried subscribing to [email protected] but it was impossible!
.org?
I’m not sure it’s okay or not.
But according to this Librelist web page: http://librelist.com/
You should send your email to [email protected]

Try again and if you couldn’t subscribe. You may be better to send your
mail to [email protected] like this:
http://librelist.com/browser//meta/2010/7/28/cannot-subscribe-flask-librelist-com/

I am attaching my image so you can analyze it and comment on it.
The image was rejected by the ruby forum.
Could you upload the image to some free web site?

1 -
how can I tell Shoes to place them on the center of the pane,
without having to specify margin?
How about the following?

Shoes.app do
five_buttons_width = (46 + 2) * 5
seven_buttons_height = (40 + 2) * 7

flow :width => five_buttons_width,
:left => (width - five_buttons_width) / 2,
:top => (height - seven_buttons_height) / 2 do
%w(7 8 9 + sin
4 5 6 - cos
1 2 3 * sinh
tan cot 0 ln /
cosh Exp log tanh =
Mod n! sqrt x2 xy
% e Pi Clr Ce
).each do |btn|
button(btn, :width => 46, :height => 46){}
end
end
end

2 -
using a stack to keep items within a flow one on top of the other
Oh, good idea.
But if you need two groups of radio buttons, you should add something
like this:

Shoes.app do
flow :margin => 6 do
radio :a; para strong(“512b BK”)
radio :a; para strong(“1K BK”)
radio :a; para strong(“MB”)
radio :a; para strong(“GB”)
radio :a; para strong(“TB”)
stack
radio :b; para strong(“Deg”)
radio :b; para strong(“Rad”)
radio :b; para strong(“Grad”)
radio :b; para strong(“DEC”)
radio :b; para strong(“HEX”)
radio :b; para strong(“BIN”)
end
end

Or simply use two flows in one stack like this:

Shoes.app do
stack do
flow :margin => 6 do
radio; para strong(“512b BK”)
radio; para strong(“1K BK”)
radio; para strong(“MB”)
radio; para strong(“GB”)
radio; para strong(“TB”)
end
flow :margin => 6 do
radio; para strong(“Deg”)
radio; para strong(“Rad”)
radio; para strong(“Grad”)
radio; para strong(“DEC”)
radio; para strong(“HEX”)
radio; para strong(“BIN”)
end
end
end

3 -
I tried to use the Pi symbol and the square root symbol and
other symbols as caption/lable for the corresponding buttons
Need to add some encoding like this:

Shoes.app do
root = [8730].pack ‘U’
pi = [928].pack ‘U’
button root.force_encoding “UTF-8”
button pi.force_encoding “UTF-8”
end

You can find unicode number on this website:
http://ideas.paunix.org/utfrefcon.htm

4 -
What is the difference between para and caption?
Almost the same, except font size.
Look at Shoes manual: http://shoes.heroku.com/manual/TextBlock.html

5 -
How can I reduce the space between flows?
Umm,… I’m not sure what you want to do. Does the following help you?

Shoes.app do
flow{para ‘aaa’}
flow{para ‘aaa’}
flow(height: 20){para ‘aaa’}
flow(height: 20){para ‘aaa’}
end

Cheers,
ashbb

I truly appreciate the help from everyone.

Couple more questions:

On Mon, Sep 20, 2010 at 10:28 AM, [email protected] wrote:

Hi Ruby S.,

I tried subscribing to removed_em[email protected] but it was impossible!
.org?
I’m not sure it’s okay or not.
But according to this Librelist web page: http://librelist.com/
You should send your email to [email protected]

Try again and if you couldn’t subscribe. You may be better to send your
mail to [email protected] like this:
http://librelist.com/browser//meta/2010/7/28/cannot-subscribe-flask-librelist-com/
Shoes.app do
five_buttons_width = (46 + 2) * 5
seven_buttons_height = (40 + 2) * 7
Where these numbers, (46 + 2) * 5 and (40 + 2) * 7 come from? I guess
the
46 is the width of my buttons, but what about the hight, which I also
defined as 46?

  % e Pi Clr Ce

).each do |btn|
button(btn, :width => 46, :height => 46){}
end
end
end

2 -
using a stack to keep items within a flow one on top of the other
Oh, good idea.
But if you need two groups of radio buttons, you should add something like
this:
radio :b; para strong(“Rad”)
radio :b; para strong(“Grad”)
radio :b; para strong(“DEC”)
radio :b; para strong(“HEX”)
radio :b; para strong(“BIN”)
end
end

What is the effect of the :a and :b flags? I noticed the actual radio
button very closed to the previous label.

end

end
Sorry, but I still could not get the pi symbol!

How can I reduce the space between flows?
ashbb

Thank you

Hi Ruby S.,

Couple more questions:
Okay.
But one question. Could you success to join Shoes ML
(removed_email_addre[email protected])?

Where these numbers, (46 + 2) * 5 and (40 + 2) * 7 come from?
I guess the 46 is the width of my buttons, but what about the hight,
which I also defined as 46?
Oh, sorry. My fault. You are right. They represent width and height.
Both 46 is correct.

What is the effect of the :a and :b flags?
I noticed the actual radio button very closed to the previous label.
They represent group names.
Look at Shoes Manual: http://shoes.heroku.com/manual/Radio.html

Sorry, but I still could not get the pi symbol!
Oops, also my fault.
Unicode number 928 is upper-case letter of pi.
Try to use 960 for lower-case letter of pi.

Hope this helps,
ashbb

On Sat, Sep 25, 2010 at 7:58 PM, ashbb [email protected] wrote:

Hi Ruby S.,

Couple more questions:
Okay.
But one question. Could you success to join Shoes ML ([email protected]
)?

Well, I re-tried AGAIN, yesterday. I replied to the first email as
requested
and nver heard back! There appear to be something wrong with the
automated
registration process.

Look at Shoes Manual: http://shoes.heroku.com/manual/Radio.html

Sure, sorry: RTFM!!! Got it!

Sorry, but I still could not get the pi symbol!
Oops, also my fault.
Unicode number 928 is upper-case letter of pi.
Try to use 960 for lower-case letter of pi.

Great, it works!

Hope this helps,
ashbb

Thank you very much for your help. I truly appreciate it!

Hi Ruby S.,

Well, I re-tried AGAIN, yesterday. I replied to the first email as
requested
and nver heard back! There appear to be something wrong with the automated
registration process.

Umm,…
Have you read this page? http://librelist.com/status.html

Sorry, I’ve no idea. Hope someone help us.

ashbb

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs