On 27 Mar 2018, at 15:32, Tudor Girba tudor@tudorgirba.com wrote:
+1
You should also look at the following utility:
(1 to: 10000000) do: [ :x | ] displayingProgress: [ :x | x asString ]
That is certainly the easiest to write, but the Job class is nicer as an OO approach.
[ :job | job title: 'Let us get started'. 1 to: 10 do: [ :each | job progress: (0.1 * each); title: 'Youpi ', each printString. (Delay forMilliseconds: 100) wait ] ] asJob run.
Here is another example where the progress is based on notifications:
[ :bar | bar title: 'Downloading Sources...'. [ ZnClient new url: 'http://files.pharo.org/sources/PharoV30.sources'; signalProgress: true; downloadTo: FileLocator temp ] on: HTTPProgress do: [ :progress | progress isEmpty ifFalse: [ bar current: progress percentage ]. progress resume ] ] asJob run.
Sven
Doru
On Mar 27, 2018, at 3:07 PM, Johan Fabry Johan@raincode.com wrote:
Yes, I'd say that UIManager is a good starting point to look for all kinds of dialogs.
-- Johan Fabry, Senior Software Engineer. johan@raincode.com | Email too brief? Here's why! http://emailcharter.org
From: Moose-dev [mailto:moose-dev-bounces@list.inf.unibe.ch] On Behalf Of Luke Gorrie Sent: Tuesday, March 27, 2018 2:52 PM To: Moose-related development moose-dev@list.inf.unibe.ch Subject: [Moose-dev] Re: Error dialog?
Thanks for the tip, Johan!
I have just stumbled upon the UIManager class. This looks like finally the right place to look for ways to show error dialogs, display a "waiting" cursor while work is being done, etc. Is that right or should I be looking somewhere else in the context of GTInspector extensions?
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
-- www.tudorgirba.com www.feenk.com
"Presenting is storytelling."
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev