[squeak-dev] The Trunk: ToolBuilder-Kernel-cmm.52.mcz
Levente Uzonyi
leves at elte.hu
Wed Oct 19 10:45:26 UTC 2011
On Wed, 19 Oct 2011, commits at source.squeak.org wrote:
> Chris Muller uploaded a new version of ToolBuilder-Kernel to project The Trunk:
> http://source.squeak.org/trunk/ToolBuilder-Kernel-cmm.52.mcz
>
> ==================== Summary ====================
>
> Name: ToolBuilder-Kernel-cmm.52
> Author: cmm
> Time: 18 October 2011, 8:12:42.168 pm
> UUID: 54416a65-63c1-4ba4-959e-7f1f7db3aa62
> Ancestors: ToolBuilder-Kernel-dtl.51
>
> Fix ability to safely catch Notification so that, if #displayProgressAt:from:to:during: is sent, will actually execute the during block.
I don't like this change, because it breaks existing code and supports a
bad pattern. For example ComplexProgressIndicator and Installer assumes
that ProgressInitiationException >> #resume just resumes with nil without
any side effects, so these are broken now.
Catching all Notifications and just resuming them is something that
doesn't work, because there may be other handlers which expect to catch
them, so you should #pass the notifications that you don't want to
swallow. Using Notification instead of specific subclasses is also a bad
idea unless you really want to process all notifications. Maybe
we should raise an error when someone is trying to signal a Notification,
because that class is just a marker and not something that should be used
as a Notification (I could say it's abstract, but I don't like this term,
because in Smalltalk it doesn't have a well-defined meaning).
Levente
>
> =============== Diff against ToolBuilder-Kernel-dtl.51 ===============
>
> Item was changed:
> ----- Method: ProgressInitiationException>>defaultAction (in category 'as yet unclassified') -----
> defaultAction
> + self resume!
> -
> - | result |
> - result := UIManager default
> - displayProgress: progressTitle
> - at: aPoint
> - from: minVal
> - to: maxVal
> - during: workBlock.
> - self resume: result!
>
> Item was added:
> + ----- Method: ProgressInitiationException>>defaultResumeValue (in category 'as yet unclassified') -----
> + defaultResumeValue
> + ^ UIManager default
> + displayProgress: progressTitle
> + at: aPoint
> + from: minVal
> + to: maxVal
> + during: workBlock!
>
>
>
More information about the Squeak-dev
mailing list
|