[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [ANN] RubyJS - Convert Ruby to Javascript

Michael Neumann

1/15/2007 8:11:00 PM

Une Bévue wrote:

> Michael Neumann <mneumann@ntecs.de> wrote:
>
>> If you want to insert Javascript code directly into your Ruby code, use
>> backticks:
>>
>> def puts(str)
>> `document.getElemementById('STDOUT')['innerHTML'] += str + "\n"`
>> end
>
> I got the same error with that writing :
> ../bin/../lib/rubyjs/method_generator.rb:1040:in `method_missing': Not
> implemented (RuntimeError)
> [...]
> from ../bin/rubyjs_gen:82

Ah, that seems to be a different problem. Can I see your "Ruby/JS" code?
You probably use a Ruby construct which is not yet supported ("case" for
example).

Regards,

Michael

1 Answer

unbewusst.sein

1/16/2007 9:46:00 AM

0

Michael Neumann <mneumann@ntecs.de> wrote:

> > I got the same error with that writing :
> > ../bin/../lib/rubyjs/method_generator.rb:1040:in `method_missing': Not
> > implemented (RuntimeError)
> > [...]
> > from ../bin/rubyjs_gen:82
>
> Ah, that seems to be a different problem. Can I see your "Ruby/JS" code?
> You probably use a Ruby construct which is not yet supported ("case" for
> example).

not at all, as i said, i've just simplified your HelloWorld class but
add the `document.getEllementById...` and change yours p(something) to
self.puts(something) here it is :

<http://www.yvon-thoraval.com/ruby2js/ntecs.de/hg-projects/rub...
essai.rb>

the parent folder contains all of this test (essai in french).
--
Artaban de Médée