Skip to main content

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

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" ;)


Back to the top