To make your example work, you would write
widget.@com.google.gwt.user.client.ui.Label::setText(Ljava/lang/String;)("Tô
no JS!");
-Vivian
i will read a little bit more about jsni. thanks!
marcos
-----Mensagem original-----
De: Google-We...@googlegroups.com
[mailto:Google-We...@googlegroups.com]Em nome de Vivian
Enviada em: quarta-feira, 16 de agosto de 2006 03:50
Para: Google Web Toolkit
Assunto: Re: Crazyness
There is any way to return my label object from JSNI back to Java?
For example:
public native static Label getLabel(String frameName, String widgetName) /*-{
widgetList = $wnd.parent.frames[frameName].framedWidgets;
for(x=0; x<widgetList.length; x++) {
if (widgetList[x].name == widgetName) {
return widgetList[x].object.@com.google.gwt.user.client.ui;
break;
}
}
alert("ERROR: Widget "+widgetName+" not found on frame "+frameName+".");
return false;
}-*/;
My problem: i have 2 GWT applications, in 2 frames, and I´m trying to update widgets from one frame to another.
Any idea? Is it possible at all?
Thanks!!
Marcos
-----Mensagem original-----
De: Google-We...@googlegroups.com
[mailto:Google-We...@googlegroups.com]Em nome de Vivian
Enviada em: quarta-feira, 16 de agosto de 2006 03:50
Para: Google Web Toolkit
Assunto: Re: Crazyness