thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Elswick, Richard" <elswi...@us.panasonic.com>
Subject RE: tutorial for javascript
Date Tue, 28 Aug 2012 13:00:09 GMT
Yes.

Richard

-----Original Message-----
From: Juan Moreno [mailto:jwellington.moreno@gmail.com] 
Sent: Tuesday, August 28, 2012 8:03 AM
To: user@thrift.apache.org
Subject: RE: tutorial for javascript

Are you planning on communicating between JavaScript and C++/Java?
On Aug 27, 2012 11:12 AM, "Elswick, Richard" <elswickr@us.panasonic.com>
wrote:

> Hi Juan,
>
> I see that now.  Thank you for point it out.  It wasn't immediately
> obvious to me.  I will try that out and see what I get now.  Just trying to
> walk through and understand the code generated from the thrift file at this
> time.
>
> I was looking for an obvious script file and didn't fully inspect the html
> file.
>
> Thanks,
> Richard
>
> -----Original Message-----
> From: Juan Moreno [mailto:jwellington.moreno@gmail.com]
> Sent: Saturday, August 25, 2012 11:51 AM
> To: user@thrift.apache.org
> Cc: dev@thrift.apache.org
> Subject: Re: tutorial for javascript
>
> This is what I see in the HTML page:
>
> function calc() {
>     var transport = new Thrift.Transport("/thrift/service/tutorial/");
>     var protocol  = new Thrift.Protocol(transport);
>     var client    = new CalculatorClient(protocol);
>
>     var work = new Work()
>     work.num1 = $("#num1").val();
>     work.num2 = $("#num2").val();
>     work.op = $("#op").val();
>
>     try {
>       result = client.calculate(1, work);
>       $('#result').val(result);
>       $('#result').css('color', 'black');
>     } catch(ouch){
>       $('#result').val(ouch.why);
>       $('#result').css('color', 'red');
>     }
>   }
>
> That is the function called calc() which is being called. Looks correct to
> me.
>
> On Fri, Aug 24, 2012 at 2:16 PM, Elswick, Richard <
> elswickr@us.panasonic.com
> > wrote:
>
> > I have not compiled the java or c++ server side code for the Javascript
> > tutorial, but it seems that it is broken as the .html page that comes in
> > the tutorial shows as the method call being calc(), not
> > calculate(logid,Work) as shown in the thrift file.
> >
> > Do I understand this correctly?
> >
> > Thanks,
> > Richard Elswick
> >
>
>
>
> --
> Juan Wellington Moreno
> *Software Engineer*
> Potomac Fusion
> 7230 Lee Deforester Drive, Suite 100
> Columbia, MD 21046
> Work: (410) 794-9040 ext 317
> Work Direct: (410) 794-9017
> Main: (347) 541-9256
>

Mime
View raw message