Need help with JSNI

2014-03-19 Thread rjcarr
I'm trying to export GWT methods using JSNI and I'm not having a lot of luck. And sometimes things happen as they should and other times they don't and it seems to be magic that is making it happen. It seems the export is happening correctly (i.e., javascript can call the GWT methods) but once

Re: Need help with JSNI

2014-03-19 Thread Jens
Is GWT's java.util.logging disabled for the compile that causes troubles? -- J. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Need help with JSNI

2014-03-19 Thread rjcarr
No, nothing changes from what I can tell. I don't mean for you to be distracted when I say it sometimes works. And the example I gave using a Logger is just one example; I see the same 'undefined' problems no matter what type of member I try to dereference. I'm more interested in if what

Re: Need help with JSNI

2014-03-19 Thread rjcarr
I've responded a couple times so I apologize if you get multiple copies but it wasn't showing up in the thread. Just wanted to say this worked and thank you so much. I've been battling this problem for quite a while. I don't know why this information isn't in the docs but it should be added

Re: Need help with JSNI

2014-03-19 Thread Jens
I don't know why this information isn't in the docs but it should be added right away. Indeed. I also always forget about that 'this' thing and I am pretty sure I would have written the same code as you did in the first post and would have lost some time again until remembering that

Re: Need help with JSNI

2014-03-19 Thread Robert J. Carr
Right, I first followed the static export example and got things working. Then realized I actually wanted to use it non-statically and got help on this forum with how to include the instance into the export (main.@...). As I said, it would work sporadically, but not always. An non-static

Re: Need help with JSNI

2014-03-19 Thread Jens
As I said, it would work sporadically, but not always. An non-static example would be very useful as I still don't completely understand why it needed to be wrapped with an anonymous function. Because $wnd.log = $entry(myInstance.@package.Class::log()) kind of means assign/copy the

Help in JSNI callback in javascript object

2012-10-02 Thread JSNI NOOB
Hi i need some help to do a wrapper to GWT. in javascript i have the following: (...) // create a new SIP stack. Not mandatory as it's possible to reuse the same satck oSipStack = new tsip_stack(txtRealm.value, txtPrivateIdentity.value, txtPublicIdentity.value)

Re: Help in JSNI callback in javascript object

2012-10-02 Thread Manuel Carrasco Moñino
This is the same question than this onehttp://stackoverflow.com/questions/12638517/jsni-associate-callback-to-javascript-objectin stackoverflow. - Manolo On Fri, Sep 28, 2012 at 4:08 PM, JSNI NOOB rpgome...@gmail.com wrote: Hi i need some help to do a wrapper to GWT. in javascript i have the

Re: Help in JSNI callback in javascript object

2012-10-02 Thread gpike
If you want the callbacks to call into your Java methods one way to do that is to assign those methods to a globally accessible Javascript variable. Then you can register those as callbacks to your on_event calls. The example I'm showing is static but you may be able to use instance methods.

help with jsni

2010-05-03 Thread rjcarr
I've recently began using a javascript library that is based on (requires) jquery so I'll be needing to write a lot more JSNI than I have in the past. I've actually got jquery working with jsni without too much trouble, but now I'm having problems with data types. I struggled quite a bit getting

Re: help with jsni

2010-05-03 Thread Sripathi Krishnan
Have you tried using Javascript Overlays? See this page - http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOverlay.html It allows you to pass objects back and forth, including JsArray. It has an example of JsArrayCustomer that you could peruse. --Sri On 3 May 2010 12:09, rjcarr

Re: help with jsni

2010-05-03 Thread Robert J. Carr
Hi Sri- That's a great reference, thanks, but it is effectively what I'm already doing (just encapsulating it better). I think my point is, in the example they gave: class JsArrayE extends JavaScriptObject extends JavaScriptObject { ... } I feel this should be part of the standard library.

Re: help with jsni

2010-05-03 Thread Robert J. Carr
Ah ... spoke too soon. You'll see in the collections examples the constructors are still protected, i.e., they still need to be created by the underlying javascript (which is sketchy). Anyway, it seems if I encapsulate all of the creation and manipulation of the array it will be transparent, I'm

Re: help with jsni

2010-05-03 Thread Sripathi Krishnan
You'll see in the collections examples the constructors are still protected, i.e., they still need to be created by the underlying javascript (which is sketchy). You could also write it like this // Return the whole JSON array, as is private final native JsArrayCustomer getCustomers()

Re: help with jsni

2010-05-03 Thread Thomas Broyer
On May 3, 9:30 am, Robert J. Carr rjc...@gmail.com wrote: Ah ... spoke too soon.  You'll see in the collections examples the constructors are still protected, i.e., they still need to be created by the underlying javascript (which is sketchy). JsArrayString listOfStrings =

Re: help with jsni

2010-05-03 Thread Robert J. Carr
Thanks for the pointer, clearly I didn't know that existed or I wouldn't have made the standard library comment. On Mon, May 3, 2010 at 1:50 AM, Thomas Broyer t.bro...@gmail.com wrote: On May 3, 9:30 am, Robert J. Carr rjc...@gmail.com wrote: Ah ... spoke too soon.  You'll see in the

Need help regarding JSNI

2009-02-17 Thread bhagyesh.bhatew...@gmail.com
Hi, In my gwt client code I'm sending a java bean to the javascript function and from that javascript function I'm calling the bean's get method. However, I'm getting exception as My code is as follows CODE public class TestBean { String t1; String t2; public