Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [golo-dev] call static

even more precisely:

import com.badlogic.gdx.Input$Keys
...
  if (keycode == Input$Keys.UP()) {
        println("up")
      }


HOOORAAYY ;)

On Thu, Jul 2, 2015 at 11:49 AM, Philippe Charrière <ph.charriere@xxxxxxxxx> wrote:
more precisely : com.badlogic.gdx.Input$Keys.UP()

On Thu, Jul 2, 2015 at 11:44 AM, Sylvain <sylvain.desgrais@xxxxxxxxx> wrote:
It seems you missed a `$` somwhere beacause of inner class declaration (http://golo-lang.org/documentation/next/index.html#_inner_classes_and_enumerations)

;)

Le jeu. 2 juil. 2015 à 11:32, Thierry Chantier <titimoby@xxxxxxxxx> a écrit :
I'm still fighting using libgdx for my first GoloGame ;)

This time, I have a question about the Keys class:
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Keys.html

It is defined as follow:
public static class Input.Keys
extends java.lang.Object
The goal is to access the key codes, for example, the code for the UP key.
This is defined as:

public static final int UP
My first guess was to try:

import com.badlogic.gdx.Input.Keys
...
if (keycode == com.badlogic.gdx.Input.Keys.UP())
...
which ends up with:

Caused by: java.lang.NoSuchMethodError: com.badlogic.gdx.Input.Keys.UP()Ljava/lang/Object;
at fr.insalyon.citi.golo.runtime.FunctionCallSupport.fallback(FunctionCallSupport.java:146)
As the Keys class as a constructor, I tried:

import com.badlogic.gdx.Input.Keys
...
let k = Keys()
...

but I got the same exception:

Caused by: java.lang.NoSuchMethodError: Keys()Ljava/lang/Object;
at fr.insalyon.citi.golo.runtime.FunctionCallSupport.fallback(FunctionCallSupport.java:146)
Any idea on what I missed this time.
Maybe I'll open a blog "Every stupid thing you can do with Golo" ;)

_______________________________________________
golo-dev mailing list
golo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/golo-dev

_______________________________________________
golo-dev mailing list
golo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/golo-dev



_______________________________________________
golo-dev mailing list
golo-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/golo-dev



Back to the top