Forum: Ruby on Rails Converting console app to Shoes

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Brett Jackson (Guest)
on 2009-02-15 14:34
(Received via mailing list)
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.
Andrius C. (Guest)
on 2009-02-16 13:23
(Received via mailing list)
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
Phlip (Guest)
on 2009-02-16 14:16
(Received via mailing list)
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
   http://broadcast.oreilly.com/2009/02/merb-mind-maps.html
This topic is locked and can not be replied to.