Thanks again for your help, Thomas.  FWIW, here's the final version in
my application code (this particular widget subclasses TextBox):

In the constructor:
        registerOnCut(getElement());

    private native void registerOnCut(Element element)
    /*-{
        var that = this;
        element.oncut = function()
        {
 
$entry([email protected]::doCut()());
            return false;
        };
    }-*/;

    @SuppressWarnings("unused")
    private void doCut()
    {
        cut(getCursorPos(), getSelectionLength());
    }

On Feb 15, 1:31 pm, Thomas Broyer <[email protected]> wrote:
> On 15 fév, 13:10, Fabiano <[email protected]> wrote:
>
> > On Feb 15, 12:22 pm, Thomas Broyer <[email protected]> wrote:> On Feb 14, 
> > 11:19 pm, Jim Douglas <[email protected]> wrote:
>
> > > [email protected]::doCut()
> > > ();
>
> > Hi,
> > this is another interesting syntax about function without arguments:
> > doCut() ();
> > Looks coherent with the google documentation.
> > What is the difference between doCut(D); and doCut()();  ?
>
> D is for 'double', not for no-arg 
> methods:http://java.sun.com/j2se/1.4.2/docs/guide/jni/spec/types.html#wp16432
> (linked from the JSNI documentation page)
>
> doCut() is a reference to the doCut method, while doCut()() calls the
> method.

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