On 2012-11-17, at 08:10, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
Hi guys. For some tests I was doing something like this:
| log result | log := FLLoggingSystemProgressItemMorph new. result := [ super serialize: anObject ] on: ProgressInitiationException do: [ :ex | ex sendNotificationsTo: log ]. self deny: log history isEmpty. ^ result
FLLoggingSystemProgressItemMorph was just a simple logger so that then I could be sure something was logged. Of course, this does not work anymore with new progress bar. Is there a way to achieve more or less the same?
Summary: -------- use JobStartNotification Details: -------- the new scheme to show progress is done the following way: [:job| job title: 'doing a lot of work'. self aLotOfWork ] asJob run. To update the progress without a direct reference to Job you throw a JobProgress progress: 0.1 title: 'new title'. All the communication with the external world is done through JobStart, JobChange and JobEnd You can see that the ProgressMorph uses exactly those announcements to update the new. Also there is the JobStartNotification which is thrown in parallel with the JobStart, so you can listen when a job/progress is started somewhere downstream in the control flow.