Font size too small? Font choice too 'different'? Want to switch between workspaces? Like running things from the command line? Here's the page you are looking for.
There are several important options that are passed into Field's runtime in a variety of ways — often, if you are just double clicking on the application or workspace document to run Field, you won't care at all. But if you are using the Field runtime with your own code, or you want to customize Field in some way, you'll get interested in these options
They can come from a wide array of sources:
-name valuein the case of JavaApplicationStub or
-Dname=valuein the case of the traditional
defaultssystem — Field's "bundle identifier" is
com.openendedgroup.Field, so you could write from the command line
defaults write com.openendedgroup.Field editorTabSize -int 2to get a smaller tab size forever.
Feel free to add your own — you can pick them up inside your code using a few techniques:
-banana 4you can write
print _self.banana. This obviously only works for things that form valid Python identifiers (passing in an option
!#some.thingwon't work because you can't write
SystemProperties.getProperty("banana", defaultBananaValue)— see the explanation at the end of this page.
editorTabSize— defaults to 4, which some people think is excessively large. Try 3 or 2.
editorFont— defaults to "Gill Sans", which some people think is just a weird font for writing code. Try
-editorFont Monacofor a fixed width font.
editorFontSize— defaults to "14", which some people think is just too small. Try
-editorFontSize 20for a substantially bigger font.
canvasBackground.b__ — set these to change the grey background of the canvas.
launch()on, Field.app ships with a main.class of
field.Facelessis also useful — this loads a sheet, but doesn't show or instantiate any user interface (see
autooption below). You can also set this to your own
field.Faceless) which file (in the workspace) to open. It's created (and added) if it doesn't exist.
python.path— the path to the (jython) python library.
python.cachedir— where jython sticks it's .jar cache files.
python.security.respectJavaAccessibility— whether to respect java's field and method access security model; should be "false" — lets the Python that you write in Field access anything it wants to access.
trampoline.class— the name of the class that installs the bytecode rewriting classloader; currently has to be "field.bytecode.protect.StandardTrampoline". See AnnotationsAndClassloading.
extensions.dir— points to Field's ExtensionsDirectory.
timer.interval— controls the update rate of Launcher's main loop, defaults to 0.01 which means 100 updates per second.
java.source.paths— a semicolon separated list of paths that Field searches when it's looking for .java files (in order to provide better auto-completions); defaults to the java files in a development directory parallel to the distribution directory.
versioning.dir— points to the top of the workspace, which must be a valid Mercurial repository.
needsFSAA— ATI graphics cards on Macs generally have hideous looking anti-aliased primitives (lines in particular), so Field asks for full screen anti-aliasing for it's buffers. This can be expensive (and unnecessary on NVidia cards). Set this to zero to disable this.
processingFullscreento '1' to force the Processing Plugin to go full screen. Set
processingFullscreento '2' to use a second display.
processingHeight— set the initial size of the Processing applet to be this width and this height.
processingHints— a colon separated list of hints to the Processing renderer. For example
-processingHints DISABLE_OPENGL_2X_SMOOTH:ENABLE_ACCURATE_TEXTURESwill disable smoothing and turn on accurate textures (whatever that means...).
withExtensions— set to a colon separated list of extensions to include. This is just like right clicking on the extension on the extension in the Plugin manager, toggling it on and restarting without the hassle of restarting. For example, to force the turning on of the Processing plugin, try
withoutExtensions— set to a colon separated list of extensions to exclude.
processingApplication— set this to
/myStrange/path/to/Processing.appif you have installed Processing.app in an odd location, or want to use a particular version of Processing with Field.
And some options useful for installed artworks, or command line "scripts":
auto — automatically executes elements in the loaded sheet that match the specified string: "name1;name2;name3 ..." where nameN is a regular expression over the names of elements in the sheet. This, together with a
field.Faceless can be a way of finishing the installation of an artwork, or using Field as a command line scripting system. See
black — set to 1 to have field.Black turn all of the screens attached to the machine to black as soon as it starts. Presumably something else (perhaps an
auto string) will fade the screens back up after everything is ready. See
withExtensions — set to a colon separated list of extensions to include. This is just like right clicking on the extension on the extension in the Plugin manager, toggling it on and restarting without the hassle of restarting. For example, to force the turning on of the Processing plugin, try
withoutExtensions — set to a colon separated list of extensions to exclude.
nosave — set to '1' to disable all write file access in Field. Again, useful for when a piece is finished and stuck in a gallery on the other side of the atlantic; defaults to unset.
collectResources — set to '1' to write
/var/tmp/field_resourcesTouched. This file notes every on-disk resource accessed while Field is running (and whether it was read, written, deleted or linked with). This is handy for making sure that your work is portable between machines, and you want to make sure that you aren't dependent on some file that's sitting on your desktop.
paranoidSave — set to '1' to backup the sheet.xml file to sheet.xml_N before saving. This, while using much disk, means that you're Field sheets are doubly-backed up: both as part of the workspace repository and as a .xml file sitting in the repository. This, in turn means, that should Field crash horribly on saving / exit and_ the workspace repository get completely corrupted to the point that you cannot revert the .field folder, you'll still be able to 'revert' by renaming sheet.xmlN to sheet.xml and removing all of the subdirectories of the .field folder. Field will recreate the folder structure inside the .field file on the next save.
And then some options that are exceedingly boring and noted here for "deep-developers":
forceNativeBuffers — should be set to '1' on Java 5 and unset on Java 6 (whenever Apple ships this). Field tries to keep large non GPU- geometry buffers as non-native, so that it doesn't run out of native buffer memory. It can't do this under Java 5 due to problems copying heap to native buffers. This will disappear under Java 6.
glResources — set to '1' to activate GL resource leak detection (this is a debug option, but good for detecting gl resources, like vertex buffers that are leaking).
trampolineExceptions — a (colon separated) list of strings that add exceptions to the Trampoline classloader. The Trampoline classloader handles all of Field's classpath extension things, and also adds the bytecode rewriting capabilities of Field. Sometimes, however, you'll be using code that really doesn't like this kind of thing being done to it. Add the package name to this list.
Regardless of the route in, these options don't manifest themselves as arguments to some
static public void main(), rather you get to them by asking
There's also a
getIntProperty (which parses and returns an int) and a
getDirProperty (which returns a string that definitely has a '/' on the end). In any case, if you are customizing these options, you'll also want to take a look at RunningField.