[squeak-dev] The Trunk: Exceptions-cmm.35.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Jun 15 20:12:31 UTC 2011
Chris Muller uploaded a new version of Exceptions to project The Trunk:
http://source.squeak.org/trunk/Exceptions-cmm.35.mcz
==================== Summary ====================
Name: Exceptions-cmm.35
Author: cmm
Time: 15 June 2011, 3:12:20.041 pm
UUID: cf08b19b-a29d-e744-b9b9-acedcb1780a2
Ancestors: Exceptions-cmm.34
Moved ProgressInitiationException out of this package, into ToolBuilder-Kernel.
=============== Diff against Exceptions-cmm.34 ===============
Item was removed:
- Exception subclass: #ProgressInitiationException
- instanceVariableNames: 'workBlock maxVal minVal aPoint progressTitle'
- classVariableNames: 'PreferredProgressBarPosition'
- poolDictionaries: ''
- category: 'Exceptions-Kernel'!
-
- !ProgressInitiationException commentStamp: '<historical>' prior: 0!
- I provide a way to alter the behavior of the old-style progress notifier in String. See examples in:
-
- ProgressInitiationException testWithout.
- ProgressInitiationException testWith.
- !
Item was removed:
- ----- Method: ProgressInitiationException class>>display:at:from:to:during: (in category 'signalling') -----
- display: aString at: aPoint from: minVal to: maxVal during: workBlock
- ^ self new
- display: aString
- at: (aPoint ifNil: [ self preferredProgressBarPoint ])
- from: minVal
- to: maxVal
- during: workBlock!
Item was removed:
- ----- Method: ProgressInitiationException class>>display:from:to:during: (in category 'signalling') -----
- display: aString from: minVal to: maxVal during: workBlock
- ^ self
- display: aString
- at: nil
- from: minVal
- to: maxVal
- during: workBlock!
Item was removed:
- ----- Method: ProgressInitiationException class>>preferredProgressBarPoint (in category 'accessing') -----
- preferredProgressBarPoint
- ^ self preferredProgressBarPosition = #cursorPoint
- ifTrue: [ Sensor cursorPoint ]
- ifFalse: [ UIManager default screen perform: self preferredProgressBarPosition ]!
Item was removed:
- ----- Method: ProgressInitiationException class>>preferredProgressBarPosition (in category 'accessing') -----
- preferredProgressBarPosition
- ^ PreferredProgressBarPosition ifNil: [ #center ]!
Item was removed:
- ----- Method: ProgressInitiationException class>>preferredProgressBarPosition: (in category 'accessing') -----
- preferredProgressBarPosition: aSymbol
- "Specify any of: #center, #topCenter, #bottomCenter, #leftCenter, #rightCenter, #topLeft, #topRight, #bottomLeft or #bottomRight or #cursorPoint."
- ^ PreferredProgressBarPosition!
Item was removed:
- ----- Method: ProgressInitiationException class>>testInnermost (in category 'examples and tests') -----
- testInnermost
-
- "test the progress code WITHOUT special handling"
-
- ^'Now here''s some Real Progress'
- displayProgressFrom: 0
- to: 10
- during: [ :bar |
- 1 to: 10 do: [ :x |
- bar value: x. (Delay forMilliseconds: 500) wait.
- x = 5 ifTrue: [1/0]. "just to make life interesting"
- ].
- 'done'
- ].
-
- !
Item was removed:
- ----- Method: ProgressInitiationException class>>testWith (in category 'examples and tests') -----
- testWith
-
- "test progress code WITH special handling of progress notifications"
-
- ^[ self testWithAdditionalInfo ]
- on: ProgressInitiationException
- do: [ :ex |
- ex sendNotificationsTo: [ :min :max :curr |
- Transcript show: min printString,' ',max printString,' ',curr printString; cr
- ].
- ].
- !
Item was removed:
- ----- Method: ProgressInitiationException class>>testWithAdditionalInfo (in category 'examples and tests') -----
- testWithAdditionalInfo
-
- ^{'starting'. self testWithout. 'really!!'}!
Item was removed:
- ----- Method: ProgressInitiationException class>>testWithout (in category 'examples and tests') -----
- testWithout
-
- "test the progress code WITHOUT special handling"
-
- ^[self testInnermost]
- on: ZeroDivide
- do: [ :ex | ex resume]
-
- !
Item was removed:
- ----- Method: ProgressInitiationException>>defaultAction (in category 'as yet unclassified') -----
- defaultAction
-
- | result |
- result := UIManager default
- displayProgress: progressTitle
- at: aPoint
- from: minVal
- to: maxVal
- during: workBlock.
- self resume: result!
Item was removed:
- ----- Method: ProgressInitiationException>>display:at:from:to:during: (in category 'as yet unclassified') -----
- display: argString at: argPoint from: argMinVal to: argMaxVal during: argWorkBlock
-
- progressTitle := argString.
- aPoint := argPoint.
- minVal := argMinVal.
- maxVal := argMaxVal.
- workBlock := argWorkBlock.
- ^self signal!
Item was removed:
- ----- Method: ProgressInitiationException>>isResumable (in category 'as yet unclassified') -----
- isResumable
-
- ^true!
Item was removed:
- ----- Method: ProgressInitiationException>>sendNotificationsTo: (in category 'as yet unclassified') -----
- sendNotificationsTo: aNewBlock
-
- self resume: (
- workBlock value: [ :barVal |
- aNewBlock value: minVal value: maxVal value: barVal
- ]
- )
- !
More information about the Squeak-dev
mailing list
|