Frequently asked questions

Well our community is large enough now to have some questions that are frequently asked — and so, a FAQ! Obviously the point of good documentation is to stop this page from growing too long or too fast so we'll try to push these things back into the pages and features that caused the confusion to begin with.

You should also read the preamble at BetaBinaryRelease — you know, the text you skipped over on to find the download link.

Not many questions to start with, but we sense that this is a rapidly growing area...

Help, I downloaded this thing and I'm lost

It keeps asking me to install Mercurial and then quitting.

This is a bug, we have tried to squash it twice (and we think that we have squashed it now). Let us know about it (field 'at' openendedgroup 'dot' com). We are particularly interested in anything 'interesting' that you've done to your Python environment. If you get too frustrated hopefully installing Mercurial by hand (as now recommend in the download page) will get you past this point.

I have a blank window and a text editor that says it's disabled. Now what?

To write code you need a box (a visual element) to put the code in. Right-click on the big empty window (the canvas) and select 'new visual element'. Now you can write code in the editor. You'll be particularly interested in the pages: TextEditor and TheCanvas.

I've written some code now what?

Field is all about executing code, so there are many, many ways of executing code. command-return executes the line your cursor is on or the text you have selected; command-0 (zero) executes everything in the editor that your cursor is in; option-left-clicking on the box does the same (and more). You'll want to look at the keyboard shortcuts in TextEditor and the list of ways of executing code in VisualElementLifecycles.

I'm a programmer, but something is going wrong

I'm a Python hacker and I know what I'm doing, but can't use <>

Firstly, you might need to tell Field about your Python package (using the Plugin Manager). Secondly, you might be out of luck if the Python library that you are using is dependent on C libraries. Field is a Java-based Python environment and uses the Java-based implementation of Python, Jython. If you still can't get something to work that should work email us.

I'm a Java hacker and I know what I'm doing, but I can't get Field to see any of my code

Point Field at your code using the Plugin Manager. You can have .jars and 'naked' class directory hierarchies. There's even a video here.

Field's running fine, but when I try and use <> it doesn't work

Apple tends to run Java apps as 64-bit apps by default. Many native libraries are 32-bit only. Thus, many native libraries and the Java packages that wrap them do not work. Fear not! Field will run under a 32-bit VM if you tell it to. See the instructions at Plugin Manager. While you are there, try to put a little pressure upstream on whoever is making that native library to get them to make 64-bit version of it. 64-bit code is the future.

Processing Plugin

Help. The Processing plugin doesn't initialize

Are you using Processing 2? Recent Field builds are Processing 2 only. We can't support both of them at the same time.

I write background(200) and execute it and nothing happens, is the whole Processing Plugin broken?

No. To have the background color of your applet change when you write something like background(200) four things have to be in order. First, you have to have turned the Processing Plugin on — using the instructions here. Secondly, Field needs to have found a Processing application — usually inside your /Applications directory. Thirdly, you have to have opted to "inject applet into global namespace", using the instructions here. Finally, you need to mark the box that you are going to write "Applet" code in as connected to the Processing environment — using the instructions here. If it doesn't work after doing all of these steps, let us know immediately.

I write int something = 4; and nothing happens / Field complains

Field's main language is Python not Java. You appear to be writing Java. Relax; take a moment to read SimpleProcessingTutorial more closely, and then head out to a good free Python tutorial. It's a great language, you'll love it.

You can write Java in Field, see OtherLanguages. But this is not probably what you came here for.

HTML style colors (like, #FF0033) don't work

They sure don't. Field's main language is Python not Java. You appear to be writing Processing/Java. In Python # is the comment character. Take a good look at a good free Python tutorial. It's a great language, you'll love it.

To actually answer the question, replace # with 0x, as in background(0xFF0033). This actually works in Java (and C, and Perl, and Ruby...) as well. I hope the Processing people find maintaining their parser and lexer worth it...

Field doesn't seem to understand width (or height or ...)

See the list of Processing 'gotchas' at the bottom of this tutorial.

Field complains when I open another sheet

Field only supports having one Processing Plugin open at a time, since plugins are per sheet, you only get one sheet that can speak directly to the Processing Applet. This is part a limitation on Field (Field could let you share the single open Processing Applet) and part a limitation of Processing's architecture (understandable, since you can only ever have one Applet running at a time in Processing). We're working on it.

So how do I do Processing work in a sheet other than default.field

Until we or somebody else can fix the above bug, you need to do the "Processing Plugin shuffle": * First close default.field * then open something else, or make a new file or something; * accept the warning message that says you can't use Processing; * Set "File->Automatically open at launch" for the file you just opened * and then restart Field.

An alternative is to run Field from the command line:

alias f=/Applications/field.app/Contents/MacOS/JavaApplicationStub 
f -field.scratch myFile.field 

Files get created in the workspace on demand if they don't exist.

Field doesn't work with this Processing library that I downloaded

Field ought to work with any random "Processing" library that you found online. We like finding .jars and installing them. And after all Processing libraries are really just Java libraries with extra branding. Two things to mention:

  • If a library has a native component (a .jnilib or a .dylib) then at the first sign of trouble you should drop down into using a 32-bit Java VM — see the instructions at Plugin Manager.
  • Sometimes Processing libraries use reflection to talk about methods added to the Processing Applet. Sometimes these methods are defined in no interface or anything. This is bad for us (and for Ruby-Processing and other interesting things). Tell them to stop doing it.

If you can't get an interesting library to work with Field — Processing or not — email the development group.

Advanced Graphics

How do I open a graphics window? You aren't expecting me to make art on this grey canvas, are you?

Field was made to be a development environment for exploring your own java codebase. In our case we have an OpenEnded group codebase that contains many many java classes that are then pieced together, tested and explored using Field into artworks. Other people using Field have their own java codebases. Field has a little special support for the codebase known as Processing, but it really is little (two short classes).

Except in the case of printmaking and architectural explorations we don't really make art on the Field canvas, we make it in a separate window; and we are expecting you do to the same. The shortest answer is to use the Processing support to open a window and draw things there. The medium answer is that you can use any Java-based graphics system of your choosing (and there are a few open source ones).

The longer answer is that the graphics system for our artworks just happens to be the graphics system that Field uses to draw it's UI, so that graphics system is already on your hard drive. We think it's a very good graphics system. The beginnings of the (python) interfaces to that graphics system can be found here. Its a very different kind of setup to Processing.

The other graphics interface is the PLine based drawing interface (which looks 2d but is secretly 3d). Recently the PLine based graphics system on the canvas has become fast enough to be used for animation, but it's really designed for notation, UI design, and PDF-based printmaking so you'll find it an odd fit unless you use it for these things.

Appearance

Can I make the tab size smaller?

Yes. There's a command line parameter -editorTabSize. Set it to 2 (the default is 4)

Like any other "command line parameter", if you aren't actually using the command line to invoke field you can do this from the terminal once and forget all about it.

defaults write com.openendedgroup.Field editorTabSize 2

Gill Sans for writing code, are you kidding?

Try this, in a terminal to change it forever:

defaults write com.openendedgroup.Field editorFont Courier

The grey background is making me depressed / I'm using Field to make PDFs, can I make the background white?

The secret incantation is S.window.background[:]=(1,1,1). That 1,1,1 refers to r,g,b.