NicolasPetton/amber — pull request #166 by pdebruic (2012-04-17 16:46:15+00:00)
Title: changes to FileServer.st to allow Cross Origin Resource Sharing

With these changes amber can be embedded in another project (e.g. Seaside) and the amber browser can write to the projects directory. Amber is served by node. Seaside is served by Zinc or whatever.

To use you must change the IDE>>#ajaxPut:data: to use absolute URLs rather than relative URLs. e.g.:

ajaxPutAt: anURL data: aString
jQuery
ajax: 'http://127.0.0.1:4000/' , anURL	options: #{	'type' -> 'PUT'.
'data' -> aString.
'contentType' -> 'text/plain;charset=UTF-8'.
'error' -> [window alert: 'PUT request failed at: ', anURL] }

I also fixed two compilation warnings:
1. The 'sys' module is now called 'util'. It should have a similar interface.
2. The deprecation warning from using Class>>#subclass:instanceVariableNames:category: in FileServer.st