// Test JavaScript looking good
function foo() { if (counter <= 10) return; }
Editing Design | HTML must add brush for Scala:
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushScala.js' type='text/javascript'/>
Simple Scala-Swing example:
package helloscala import swing._ object SimpleTextView extends Frame { title = "Simple Text View" location = new java.awt.Point( 200,100 ) minimumSize = new java.awt.Dimension(600, 400) var outArea : TextArea = new TextArea; showText("") def showText(sometext:String) = { outArea.font = new java.awt.Font("Arial", java.awt.Font.BOLD, 12) outArea.text = sometext contents = outArea open } def addText(moretext:String) = { outArea.text += moretext } def writeln(moretext:String) = addText(moretext+"\n") }