I have got it working with a specified JSNI path as a return
parameter. ie: "x...@com.google.gwt.secure.whocares::splurb =
responseString;"
where "x...@com.google.gwt.secure.whocares::splurb" is specified as a
parameter.
however, due to said others not knowing what this all means and how it
all fits together... I would like to simplify things a bit further...
is it possible to retrieve said return path etc from a variable that
is passed?
ie: is there a function I can call on the parameter to get such a
string or any javascript etc that might allow me to simply return the
string to one of the variables passed in the parameters?
at first I thought merely setting one of the parameters might work
since javascript is reference based, but was very quickly proven
dismally wrong.
:)
Ian
--
Tired of pop-ups, security holes, and spyware?
Try Firefox: http://www.getfirefox.com
You'll need to use pointers. With generics you can make some very
nifty hacks, but lacking those, I suggest an array of size 1, which is
effectively a pointer as well. You pass the array reference to your
method, JSNI or not, and on return you stuff the result in
arrayReference[0].
I sort of fail to see the use of this though. Knowing when the info is
actually filled (e.g. a callback) sounds useful to me.
On May 8, 5:22 pm, Reinier Zwitserloot <reini...@gmail.com> wrote:
> Indeed; what Ian said.
>
> You'll need to use pointers. With generics you can make some very
> nifty hacks, but lacking those, I suggest an array of size 1, which is
> effectively a pointer as well. You pass the array reference to your
> method,JSNIor not, and on return you stuff the result in
> arrayReference[0].
>
> I sort of fail to see the use of this though. Knowing when the info is
> actually filled (e.g. a callback) sounds useful to me.
>
> On May 7, 4:46 pm, "Ian Petersen" <ispet...@gmail.com> wrote:
>
> > I'm not 100% sure about this, but I doubt you'll be able to store a
> > string like "x...@com.google.gwt.secure.whocares::splurb" in a parameter,
> > and then evaluate it at runtime. The syntax GWT uses for accessing
> > Java methods and fields fromJSNIis not valid Javascript so the
You do realize your website's users will curse your name and dance on
your grave? blocking in javascript means the whole browser is down
until the blocking is over. If you're very lucky, the browser will
call you on your silly blocking scheme and offer the user the option
to shut you down, at which point your app stops working.
Bad, bad, baaahaaaad idea.
Learn to write anonymous inner classes.