Javascript newbie here, trying to create the following Javascript overlay 
type. How can I accomplish this? this.name should evaluate to this.userId

public class LoginInfo extends JavaScriptObject {
    private static final String USER_ID = "userId";
   
    protected LoginInfo() {
    }
    
    public final int getUserId() {
        return getNumberValue(USER_ID);
    }    
    
    public final native int getNumberValue(final String name) /*-{
        return $this.name; // Not working
    }-*/;
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to