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
Mon Feb 13 2012 19:26:38 GMT+0100 (CET): How are you today? Mon Feb 13 2012 19:26:23 GMT+0100 (CET): Hey
How are you today?
do it