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. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 On Feb 15, 5:41 am, Brett Jackson <brettbj.jack...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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. > > 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.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---