Frank, When I have more time, I sure have to read your stuff, it seems quite interesting. Sven On 12 Jul 2012, at 22:56, Frank Shearar wrote:
On 12 July 2012 21:00, Sven Van Caekenberghe <sven@beta9.be> wrote:
It is better explained with code ;-)
With:
Sven Van Caekenberghe uploaded a new version of Zinc-HTTP to project Zinc HTTP Components: http://www.squeaksource.com/ZincHTTPComponents/Zinc-HTTP-SvenVanCaekenberghe...
==================== 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 ] ].
Sven
Yes: my Control library just provides a touch more formalism than arbitrary resumable exceptions, but it's otherwise just that.
frank
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?
Thanks, Sean
-- View this message in context: http://forum.world.st/ENH-Zinc-Streaming-Download-Progress-tp4639686p4639711... Sent from the Pharo Smalltalk mailing list archive at Nabble.com.