Skip to content

Instantly share code, notes, and snippets.

@autoletics
Created February 13, 2017 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save autoletics/c3a83909febec391b5148ff85b4d34b4 to your computer and use it in GitHub Desktop.
Save autoletics/c3a83909febec391b5148ff85b4d34b4 to your computer and use it in GitHub Desktop.
private static final Name MOVE = name(CanvasApp.class).name("move");
private static final Name MOVE_X = MOVE.name("x");
private static final Name MOVE_Y = MOVE.name("y");
public static void main(String... args) {
final Environment env = context().getEnvironment();
int x=10; int y=10;
try {
env.setInt(MOVE_X, x);
env.setInt(MOVE_Y, y);
move(x, y);
} finally {
env.remove(MOVE);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment