Thanks so much. Will try it out and post results.

On Jan 26, 10:46 pm, Brendan Kenny <[email protected]> wrote:
> Oh! And (hopefully I'm not stating the obvious here), check out the
> "apply" Function 
> method:https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global...
>
> and be careful with what "this" you pass into with it if the author of
> that function made any assumptions about what this would refer to. The
> exciting world of javascript!
>
> On Jan 26, 9:39 pm, Brendan Kenny <[email protected]> wrote:
>
> > Check out the answers 
> > here:http://stackoverflow.com/questions/359788/javascript-function-name-as...
>
> > Though the executeFunctionByName example seems a little overblown. The
> > real take away is to not use eval() if you can help it.
>
> > I would also check to make sure the function is really a function
> > before you call it (e.g. typeof $wnd[globalFunctionName] ===
> > 'function').
>
> > On Jan 26, 4:05 pm, Patrick <[email protected]> wrote:
>
> > > Hi,
>
> > > I have a requirement where I have to call from GWT client code into an
> > > arbitrary JavaScript function given only its name.
>
> > > For example I have the name of the function as a String say
> > > "doSomething" and I have an array of Strings for arguments. I'm
> > > expecting that the function is already defined and implemented in the
> > > browser by our customers but it could be anything and there can be
> > > more than one of them. Meaning there might be one of these functions
> > > or there could be 100.
>
> > > I'm just wondering what the correct JSNI syntax for the body would be
> > > for the following?
>
> > > protected native void invokeJSFunction(String functionName, String[]
> > > args)
> > > /*-{
> > >                 // what would I put here?
>
> > > }-*/;
>
> > > Any help is greatly appreciated!
>
> > > Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to