GrafoscopioUtils/repository/Grafoscopio-Utils/GrafoscopioUtils.class.st
Offray Luna a4af9071a5 First public commit to modularize Grafoscopio.
Now GrafoscopioDocumentation can be downloaded
by several related projects without having to download the full Grafoscopio Package, only the Utilities. Maybe here we can put also the ones
that deals with installation of simple software
(Fossil, SQLite)... time will tell.
2020-05-02 22:53:56 +00:00

30 lines
759 B
Smalltalk

"
I contain simple functionality used by Grafoscopio, Datavis or other
related projects.
"
Class {
#name : #GrafoscopioUtils,
#superclass : #Object,
#category : #'Grafoscopio-Utils'
}
{ #category : #'graphical interface' }
GrafoscopioUtils class >> downloadingFrom: downloadUrl withMessage: aString into: location [
| fileName |
fileName := (downloadUrl splitOn: $/) last.
(location / fileName) exists ifTrue: [ (location / fileName) ensureDelete ].
[: bar |
bar title: aString.
[ZnClient new
enforceHttpSuccess: true;
url: downloadUrl;
downloadTo: location;
signalProgress: true
]
on: HTTPProgress
do: [ :progress |
progress isEmpty ifFalse: [ bar current: progress percentage ].
progress resume ].
] asJob run.
]