免責聲明

Disclaimer (免責聲明)
繼續閱覽代表您接受以上的免責聲明.
To continue reading means you accept the above disclaimer.

2012年5月29日 星期二

Neko/nme trial

//=== start the haxeserver.bat file that is in the Haxe installation directory.
nekotools server -p 2000 -h localhost -d  C:\WebRoot/
nekotools server -p 2000 -h localhost -d  C:\WebRoot/ -rewrite

//=== Index.hx --> index.n
haxe neko.hxml
move index.n to C:\WebRoot\

//=== try to connect the following url
http://localhost:2000/server:config
http://localhost:2000/?x=33;v=hello
http://localhost:2000/user

//=== dispatch
http://localhost:2000/user 
need doUser() function
need -rewrite when starting neko web server
(i.e. nekotools server -p 2000 -h localhost -d  C:\WebRoot/ -rewrite )
In case the corresponding method doXXXX is not found on the api object, or if the URL is /, the action doDefault is used instead. An exception DispatchError.DENotFound("XXXX") is thrown if there is no default action (XXXX here being the placeholder for the URL part name).




//===
haxelib install nme
2012.05.29 --> nme 3.3.2
partially solved the problem for http://localhost:2000/?x=33;v=hello

[Q] relation between neko and nme?


[ref]
http://haxe.org/doc/start/neko
http://www.haxenme.org/documentation/setup/
http://www.haxenme.org/download
http://haxe.org/manual/dispatch
http://nekovm.org/doc/begin



//=== neko webserver error : Invalid_char
Called from tools/Tools.nml line 40
Called from core/Args.nml line 43
Called from core/Args.nml line 50
Called from tools/Tools.nml line 31
Called from core/Net.nml line 96
Called from core/Array.nml line 100
Called from core/Net.nml line 102
Called from tools/WebServer.nml line 58
Called from tools/WebServer.nml line 58
Called from tools/WebServer.nml line 53
Called from tools/WebServer.nml line 17
Called from core/Lexer.nml line 219
Called from tools/WebServer.nml line 10
Called from core/Core.nml line 197
Exception : Invalid_char

2012年5月23日 星期三

如何讓 chrome 可以從本機網頁 連載 internet的網頁?

[Q] 如何讓 chrome 可以從本機網頁 連載 internet的網頁?
[Q] How to allow chrome to load internet url from local html files?

[try]
0.  chrome.exe --disable-web-security
--disable-web-security 參數將讓chrome 允許所有的 cross-domain requests?
似乎相當危險 ;
1.  為了網頁測試方便 有時還是需要 --disable-web-security ,
建議side-by-side安裝另一個版本的chrome : Chrome Canary ;

2. 然後在桌面上產生一個指到 "chromeCanary  --disable-web-security"的捷徑,
固定用此捷徑來開啟測試網頁, 就不會影響到原來chrome的安全設定了.

[ref]
http://stackoverflow.com/questions/4819060/allow-google-chrome-to-use-xmlhttprequest-to-load-a-url-from-a-local-file

http://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/bf71d02dae94eb88

http://www.ehow.com/how_7208987_add-line-parameter-windows-shortcut.html