[Pharo-project] [ENH]: Zinc - Streaming Download Progress
Sven Van Caekenberghe
sven at beta9.be
Thu Jul 12 17:05:33 EDT 2012
When I have more time, I sure have to read your stuff, it seems quite interesting.
On 12 Jul 2012, at 22:56, Frank Shearar wrote:
> On 12 July 2012 21:00, Sven Van Caekenberghe <sven at beta9.be> wrote:
>> It is better explained with code ;-)
>> Sven Van Caekenberghe uploaded a new version of Zinc-HTTP to project Zinc HTTP Components:
>> ==================== Summary ====================
>> Name: Zinc-HTTP-SvenVanCaekenberghe.285
>> Author: SvenVanCaekenberghe
>> Time: 12 July 2012, 9:58 am
>> UUID: e992fd76-efde-4b31-b4b4-bd468f8176f2
>> Ancestors: Zinc-HTTP-SvenVanCaekenberghe.284
>> enabled HTTPProgress signalling during streaming up/downloads.
>> introduction of ZnSignalProgress with #enabled method
>> You should now be able to do something like:
>> UIManager default informUserDuring: [ :bar |
>> '/Users/sven/Desktop/test-99425.txt' asFileReference ensureDeleted.
>> ^ ZnClient new
>> signalProgress: true;
>> url: 'http://s3-eu-west-1.amazonaws.com/public-stfx-eu/test-99425.txt';
>> downloadTo: '/Users/sven/Desktop/' ]
>> on: HTTPProgress
>> do: [ :progress |
>> bar label: progress printString.
>> progress total ifNotNil: [
>> 1 second asDelay wait.
>> bar current: (progress amount / progress total) * 100 ].
>> progress resume ] ].
> Yes: my Control library just provides a touch more formalism than
> arbitrary resumable exceptions, but it's otherwise just that.
>> On 12 Jul 2012, at 19:11, Sean P. DeNigris wrote:
>>> Sven Van Caekenberghe wrote
>>>> There is already a usecase in ZnConnectionTimeout.
>>> Okay, I checked out the code. How does that concept apply here? Maybe a
>>> quick example?
>>> View this message in context: http://forum.world.st/ENH-Zinc-Streaming-Download-Progress-tp4639686p4639711.html
>>> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
More information about the Pharo-dev