I create a Command instance and pass that into the event handler

On Jan 11, 2013 7:32 AM, "Jens" <[email protected]> wrote:
>
> To mimic method invocation in GWT you need to generate code that handles
all possible methods for a given class. A typical example that exists in
GWT is ClientBundleWithLookup which will be generated by GWT and has a
method getResource(String name). The generated code of getResource(String
name) may look like:
>
> ResourcePrototype getResource(String functionName) {
>   if("existingFunction1".equals(functionName)) {
>     return this.functionName();
>   }
>   if("existingFunction2".equals(functionName)) {
>      return this.functionName2();
>   }
> }
>
> So basically it dispatches the method name and calls the method. I think
there are some libraries that provide limited reflection support for GWT,
but always keep in mind that they probably will generate lots of code that
GWT can not optimize away in most cases (like the function above can't be
optimized if the input is dynamically calculated).
>
>
> -- J.
>
> --
> You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
> To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/R8nkNmJ_F4IJ.
>
> 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.

-- 
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