diff --git a/reference/GuiWebDownload/init b/reference/GuiWebDownload/init index 600f93ec4..46c2f4f1d 100644 --- a/reference/GuiWebDownload/init +++ b/reference/GuiWebDownload/init @@ -1,4 +1,4 @@ -#ifndef _SocketProgress_icpp_init_stub -#define _SocketProgress_icpp_init_stub +#ifndef _GuiWebDownload_icpp_init_stub +#define _GuiWebDownload_icpp_init_stub #include "CtrlLib/init" #endif diff --git a/reference/GuiWebDownload/main.cpp b/reference/GuiWebDownload/main.cpp index 8258af1d9..84d9f909b 100644 --- a/reference/GuiWebDownload/main.cpp +++ b/reference/GuiWebDownload/main.cpp @@ -21,13 +21,14 @@ void Loader::Perform() if(!EditText(url, "Download", "URL")) break; loaded = 0; - HttpRequest http(url); - http.MaxContentSize(INT_MAX); + pi.Reset(); + http.New(); + http.Url(url).MaxContentSize(INT_MAX); http.WhenContent = THISBACK(ProcessContent); - http.WhenWait = THISBACK(ShowProgress); + http.WhenWait = http.WhenDo = THISBACK(ShowProgress); http.Execute(); if(!http.IsSuccess()) - Exclamation("Failed !"); + Exclamation("Failed !&\1" + http.GetErrorDesc()); } } @@ -38,7 +39,7 @@ void Loader::ProcessContent(const void *ptr, int size) void Loader::ShowProgress() { -DDUMP(http.GetPeerAddr()); + DDUMP(http.GetPeerAddr()); if(http.GetContentLength() >= 0) pi.Set((int)loaded, (int)http.GetContentLength()); else diff --git a/reference/JSON/main.cpp b/reference/JSON/main.cpp index 54ffd6ff7..44cdbe652 100644 --- a/reference/JSON/main.cpp +++ b/reference/JSON/main.cpp @@ -37,7 +37,7 @@ CONSOLE_APP_MAIN catch(CParser::Error) { LOG("invalid JSON"); } - + LOG("- Composing JSON using support classes"); Json json; json diff --git a/reference/Jsonize/Jsonize.upp b/reference/Jsonize/Jsonize.upp index 8f54e5217..e304d17f9 100644 --- a/reference/Jsonize/Jsonize.upp +++ b/reference/Jsonize/Jsonize.upp @@ -1,3 +1,5 @@ +description "Json based object persistency\377"; + uses Core;