url = URL.codeBase.withFilename("../sandbox/chat.txt")
var webR = new WebResource(url)
// download from server
webR.get()
if (webR.status.isSuccess())
chatString = webR.content // a string
else
chatString = ""
var msg = this.get('ChatInput').textString
var newContent = "" + new Date() + ":\n " + msg + "\n"+ chatString
// upload to server
webR.put(newContent)
// only to see that there is something happening
this.get('ChatText').textString = newContent