== Coding guidelines == * Be sensible * Be tolerant == Dependencies and targets == * We target Flash Player 9 at present. Please don't add FP10-specific code yet. * Potlatch 2 requires Flex; the Halcyon rendering component doesn't. Don't add Flex stuff (import mx.*) to anything in net.systemeD.halcyon. * Both Potlatch 2 and Halcyon can be deployed locally (i.e. not on openstreetmap.org), and indeed can talk to databases other than the main OSM instance. So don't be too OSM-specific == Whitespace == * Use space, not tabs. You can only get away with tabs if your name is Richard Fairhurst * Set your editor to treat tabs as four spaces when viewing them, otherwise you'll go mad * Blank lines shouldn't have whitespace * No trailing whitespace * Only "fix" whitespace errors while changing that line of code for other reasons. Otherwise, it's not worth fixing. == Indentation == package net.systemed.potlatch2.indentation { class IndentedByFourSpaces { public function IndentedByFourMoreSpaces():void { if (indentedCodeWithinFunctionHasTwoSpaceIndents) { // lots of places in the codebase have two-space indents within functions // like this. Don't mix and match like this example! beConsistent = true; } else { useFourSpaceIndents = true; } } } } == MXML == * Indentation is like the wild west in there. Consistency is king.