Hi,

First of all instead of using eval you could use:
$wnd[canvasname] that is a much cleaner way of getting to the
variable.

Secondly the problem is with you callback not working is because you
should call this method on this. Now because you invoke it from an
anonymous JS function, the context is different from what you expect.

The code should become something similar to:
I presume that the class in which you method is defined is
be.sofico.montelli.mmc.client.custom.widgets.upload.SRAFileUpload ?
Then I would use:

public static native void defineBridgeMethodSubmitDone() /*-{
    var _this = this;
    $wnd.submitDone = function(canvasname, filename) {
         $wnd.alert("Upload done: " + canvasname + " - " + filename);
         var cnv = $wnd.canvasname;
         $wnd.alert("Form object: " + cnv);
         var myvar =
_t...@be.sofico.montelli.mmc.client.custom.widgets.upload.srafileupload::submitD­
oneInternal(Ljava/lang/String;)(filename);
         $wnd.alert("Incoming: " + file + " Processed: " + form);
     }
}-*/;

David

On Sep 25, 5:26 pm, Steven De Groote <[email protected]> wrote:
> @Thomas Broyer: Both solutions work for retrieving the cnv object, but
> I still can't call the submitDoneInternal() ...
>
> Any ideas welcome!
>
> Steven
>
> On Sep 25, 4:17 pm, Thomas Broyer <[email protected]> wrote:
>
>
>
> > On 25 sep, 13:08, Paul Robinson <[email protected]> wrote:
>
> > > Does this work:
> > >     var cnv = eval("$wnd." + canvasname);
>
> > argl!
>
> > Please:
> >    var cnv = $wnd[canvasname];- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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