Installing Field for Developers

First, some prerequisites for developing (with) Field:

  • We're on github.
  • Make sure you're running with either OS X 10.7 or later or a Ubuntu-ish Linux that has Nvidia proprietary graphics drivers.
  • For OS X: make sure you have the developer tools for OS X installed (if you haven't, it's quite possible you aren't the intended audience for this project).
  • Install Mercurial — binary pacakges for OS X are available here: http://mercurial.berkwood.com/ (and, if you haven't used it before, take a moment to familiarize yourself with what it is and does - it's not just used for getting Field, it's used as part of Field as well).
  • If you get into trouble ask questions on our group, or email us directly: Field's email address is field at openendedgroup dot com. Issues are filed on github.
  • If you just want to build Field, all you need is ant. If you want to hack on the Java sources for Field, there are Eclipse projects included in the repository.

Getting Field

See the instructions on our GitHub page.

Integrating it with your own code-base

Take a look at the /extensions directory, and its documentation and most importantly the UI for this extensions directory, the Plugin Manager [PaletteOverview#ThePluginandExtensionmanager] — there's even a tutorial video. Specifically, it's likely that you'll want to add an entry that points Field towards your own java class-files and sources (and your own Python sources if you have any).

You could also take a look at RunningField and StartupOptions to familiarize yourself a little with what's actually happening when you run Field, and decide exactly how you want to run it (Marc recommends the command line). Of particular interest is the -field.scratch option which changes which workspace file you are loading on startup (such files are created on demand), and the -main.class option that just uses Field's Launcher to run the class you pass into it. You can open the Field UI in your own code later, or if needs be load and execute sheets without instantiating any UI at all.

The three things you'll want to know

The top three early answers to questions:

  • You right click on the canvas and select "make new visual element" — this gets you a "box" to type python code in.
  • You'll need to from my.java.codebase import * or from still.more.java.code import Wonder to access your codebase. In this case, typing Won and hitting Command-I might help. See CompletionAndInspection.
  • Field saves when you exit (Command-Q, Ctrl-C from the command line, a crash, or your code calling System.exit). The quickest way to exit without saving is a swift kill -9 from the command line. There's also a menu option in the File menu. If you make a mistake, and, worse, end up saving it, don't worry: all versions of your sheet are version controlled.

Programmers should take a glance at StartingPlaceForPythonProgrammers — then, next, at the StandardLibrary or, if you are coming over from Processing, the tutorial for Processing.