Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7917639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:13:24+00:00 2026-06-03T15:13:24+00:00

Maybe my question is simple to solve for you, but I’m sitting here for

  • 0

Maybe my question is simple to solve for you, but I’m sitting here for a few hours with following problem (and I have already searched for it):

I have a Java method which has JavaScript code inside (JSNI from Google’s GWT) to set key bindings for the code editor CodeMirror2. When I want to compile with GWT, I’m getting an error from the GWT compiler:

[ERROR] Line 195: invalid label
> "F11": function() {

My code looks like this:

public final native void setExtraKeysCallback() /*-{
    this.extraKeys = function(editor) {
        "F11": function() {
            // do something
        },
        "Esc": function() {
            // do something
        }
    };
}-*/;

The really strange thing is that in native JS the extra keys are working with this syntax?! I think the problem is the label syntax, how could I change this to work with GWT?

Thanks, leX

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:13:27+00:00Added an answer on June 3, 2026 at 3:13 pm

    You seem to be mixing object literal syntax:

    { "key": value, "key2", value2 }
    

    … with function expression syntax:

    function () { }
    

    Decide if you are trying to create a simple object or a function (or a function that returns a simple object) and use the appropriate syntax for that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok so this maybe a simple/silly question but I don't know so here goes:
Maybe it's a simple question but I didn't succeed to solve it. DNSperf is
this is (maybe) an already asked question... but i've some difficul to solve my
Simple question, but could somehow not find any answer on google (maybe it's just
Maybe my question it's a little weird, but I'm trying to build a not-so-simple
I'm rather new to WPF, so maybe this is a simple question. I have
this may be a simple question but am struggling to understand how to solve
Maybe this question is kind of silly but I have no clue how to
Maybe a simple question but I'm having alot of trouble making a button change
I'm new to Symfony2 and I have maybe a simple question about encoding my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.