# Converting console app to Shoes

**URL:** <https://www.ruby-forum.com/t/converting-console-app-to-shoes/160369>\
**Category:** Rails\
**Created:** [February 15, 2009, 1:34pm UTC](https://www.ruby-forum.com/t/converting-console-app-to-shoes/160369 "2009-02-15T13:34:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brett\_Jackson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b487fb/32.png) [@Brett\_Jackson](https://www.ruby-forum.com/u/Brett_Jackson)\
**Post date:** [February 15, 2009, 1:34pm UTC](https://www.ruby-forum.com/t/converting-console-app-to-shoes/160369/1 "2009-02-15T13:34:31Z")

</div>

Ugh, I’m at my wits end. I’ve been trying for hours to convert this  
simple app to work on Shoes, and I still haven’t found a solution, and  
I was wondering if someone could steer me in the right direction on  
how to do this.

require ‘rubygems’  
require ‘Linguistics’

# This gem extends the classes. This statement extends them.

Linguistics::use( :en, :installProxy =\> :en )

# My loop-workings

i = 10  
until i \< 1  
thenumber = gets.to\_i

# Changes the number into a form that you would speak

puts thenumber.numwords, “\n”  
end

So basically, I type in a number like 36,090 and it returns with  
"Thirty-six thousand and ninety’. Using the Linguistics gem. I’m new  
to Ruby (and programming in general) and this is my first post to a  
mailing list, so bare with me.

---

<div class="post-metadata">

**Author:** ![Brett\_Jackson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b487fb/32.png) [@Brett\_Jackson](https://www.ruby-forum.com/u/Brett_Jackson)\
**Post date:** [February 16, 2009, 12:23pm UTC](https://www.ruby-forum.com/t/converting-console-app-to-shoes/160369/2 "2009-02-16T12:23:21Z")

</div>

Well first of all you will have to create EditBox and TextBlock. Then  
create a button passing a block to it. This block should read value of  
EditBox.text convert it and store it to TextBlock.text. You should  
probably read shoes elements documentation at  
[http://help.shoooes.net/Elements.html](http://help.shoooes.net/Elements.html)

---

<div class="post-metadata">

**Author:** ![Brett\_Jackson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b487fb/32.png) [@Brett\_Jackson](https://www.ruby-forum.com/u/Brett_Jackson)\
**Post date:** [February 16, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/converting-console-app-to-shoes/160369/3 "2009-02-16T13:16:50Z")

</div>

Brett Jackson wrote:

> Ugh, I’m at my wits end. I’ve been trying for hours to convert this  
> simple app to work on Shoes, and I still haven’t found a solution, and  
> I was wondering if someone could steer me in the right direction on  
> how to do this.

This forum discusses “Ruby on Rails”, which is Shoes’s sibling-rival.

Questions like these need a newsgroup with more responders who know  
Shoes, such  
as Shoes’s adventurer’s mailing list…

> So basically, I type in a number like 36,090 and it returns with  
> "Thirty-six thousand and ninety’. Using the Linguistics gem. I’m new  
> to Ruby (and programming in general) and this is my first post to a  
> mailing list, so bare with me.

I would write a unit test that uses the Linguistics gem directly,  
without Shoes.  
That’s the most important programming tip you will hear in a long time -  
to  
write tests on modules, decoupled from the whole app.

Install ruby itself from a distro, such as the One Click Installer, and  
learn it  
independent from Shoes, as you learn Shoes.

And, if you will bear with me here, I must decline your offer to bare  
with you! (-:

–  
Phlip  
[Radar – O’Reilly](http://broadcast.oreilly.com/2009/02/merb-mind-maps.html)
