JsInterop callback function with parameters

2015-09-24 Thread Cristian Rinaldi
Hey: I'm using JsInterop to map some JS APIs. What is the best way to map a callback to receive multiple parameters? For example, a jQuery click handler: function (event, params) Java could be: Function (Event, Object []), but then is complicated to manipulate the "Object []", there is

Callback Function

2010-09-14 Thread gadaleta.marco
Hi, I've a big problem, and i've not solution. This my problem: i have 2 class A and B. A call B, and B execute an asyncronous call. On result event i need to call A method from B. There's a way to set a callback function in A for B class? I hope in your help. Thx, Marco -- You received

Re: Callback Function

2010-09-14 Thread Marco Gadaleta
I fixed it ;-) 2010/9/14 gadaleta.marco gadaleta.ma...@gmail.com Hi, I've a big problem, and i've not solution. This my problem: i have 2 class A and B. A call B, and B execute an asyncronous call. On result event i need to call A method from B. There's a way to set a callback function

Re: Callback function implemented in Java

2009-09-15 Thread JaM
Not sure if this helps or not, but it seems that when performing the callback I don't have any access to member variables which are not declared final (and can't access the parents variables at all if I use an inner class). This seems strange that I wouldn't be able to access non final member

Re: Callback function implemented in Java

2009-09-15 Thread Thomas Broyer
On 15 sep, 04:24, JaM jej2...@gmail.com wrote: I previously posted about Shindig, when probably more appropriately I should have posted this question (sorry for the dup). I have successfully implemented a callback in Java (using an interface) which is called from Javascript appropriately,

Re: Callback function implemented in Java

2009-09-15 Thread JaM
Thanks for the reply! I am trying to digest this as I am new to GWT and Javascript so please bare with me. Ok, so clearly I am missing something here. Currently I am not calling static methods (is this required?) for the callback because I want to be able to access member variables. I have

Re: Callback function implemented in Java

2009-09-15 Thread JaM
also, unless I am doing something wrong the above does not seem to work properly I get an error on compile saying [ERROR] Line 50: Expected a valid parameter type signature in JSNI method reference which is pointing at the nativeSubscribe method. Again your help is appreciated.

Re: Callback function implemented in Java

2009-09-15 Thread JaM
typohave .'s instead of /'s in the JSNI...fixed an am trying now On Sep 15, 12:21 pm, JaM jej2...@gmail.com wrote: also, unless I am doing something wrong the above does not seem to work properly I get an error on compile saying [ERROR] Line 50:  Expected a valid parameter type

Re: Callback function implemented in Java

2009-09-15 Thread JaM
Ok, so after doing what was listed above it seems as if the scope is correct. It's a little strange to me that what I was doing originally did not work but having this work makes me very happy. Thank you for your help, it really is appreciated. On Sep 15, 12:23 pm, JaM jej2...@gmail.com wrote:

Callback function implemented in Java

2009-09-14 Thread JaM
I previously posted about Shindig, when probably more appropriately I should have posted this question (sorry for the dup). I have successfully implemented a callback in Java (using an interface) which is called from Javascript appropriately, but after doing so it seems something is not quite