2014-02-25 9:37 GMT+01:00 Sven Van Caekenberghe <sven@stfx.eu>:
Pavel,

I am surprised that a die hard hacker like you could not find it yourself ;-)

Anyway, this is how you do it:

UIManager default informUserDuring: [ :bar |
� [
� � ZnClient new
� � � url: 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/27.0/runtimes/xulrunner-27.0.en-US.win32.zip';
� � � signalProgress: true;
� � � downloadTo: 'xulrunner.zip' ]
� � � � on: HTTPProgress
� � � � do: [ :progress |
� � � � � � � � bar label: progress printString.
� � � � � � � � progress isEmpty ifFalse: [ bar current: progress percentage ].
� � � � � � � � progress resume ] ].

First you enable progress signalling, then you catch HTTPProgress and do something with it.

Sven

On 25 Feb 2014, at 09:04, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:

> Hi,
>
> is there a way how to show progress bar during download of a big files using #downloadTo: message of the ZnClient? The image is not responsive for a long time and users may think it's frozen.
>
> example:
>
> ZnClient new url: 'http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/27.0/runtimes/xulrunner-27.0.en-US.win32.zip';
> downloadTo: 'xulrunner.zip'.
>
> Cheers,
> -- Pavel




Or:

[ :bar |
� � � signalProgress: true;
� � � downloadTo: 'xulrunner.zip' ]
� � � � on: HTTPProgress
� � � � do: [ :progress |
� � � � � � � � bar label: progress printString.
� � � � � � � � progress isEmpty ifFalse: [ bar current: progress percentage ].
� � � � � � � � progress resume ] ]
asJob run.