I know that when calling a java function inside a native function, you
should add this. in the front. but if this is inside event handler,
"this." becomes the element who received the event, and there is this
ambiguity. e.g.
        private native void addClickListener(Element imgElement)/*-{
                imgElement.onclick = function() {
                        this.style.border = '1px solid blue';
 
th...@com.jcalc.webclient.client.webpage.canvaseditor::highlight(Lcom/
google/gwt/user/client/Element;)(this);
        };
        }-*/;


as you can see, the first this. in this.style.border = '1px solid
blue'; meant imgElement. but the next one in the line below is meant
to refer the this java class.

how would I refer to this class instance?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to