Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.451.mcz
==================== Summary ====================
Name: System-ul.451
Author: ul
Time: 3 August 2011, 1:53:21.094 am
UUID: 12173273-4139-304d-b495-6d34396d067c
Ancestors: System-eem.450
Removed unnecessary blocks.
=============== Diff against System-eem.450 ===============
Item was changed:
----- Method: AbstractLauncher>>parameterAt:ifAbsent: (in category 'private') -----
parameterAt: parName ifAbsent: aBlock
"Return the parameter named parName.
Evaluate the block if parameter does not exist."
^self parameters
at: parName asUppercase
+ ifAbsent: aBlock!
- ifAbsent: [aBlock value]!
Item was changed:
----- Method: ImageSegment>>allInstancesOf:do: (in category 'instance change shape') -----
allInstancesOf: aClass do: aBlock
| withSymbols oldInstances segSize |
"Bring me in, locate instances of aClass and submit them to the block. Write me out again."
(state = #onFile or: [state = #onFileWithSymbols]) ifFalse: [^ self].
withSymbols := state = #onFileWithSymbols.
(outPointers includes: aClass) ifFalse: [^ self].
"If has instances, they point out at the class"
state = #onFile ifTrue: [Cursor read showWhile: [self readFromFile]].
segSize := segment size.
self install.
oldInstances := OrderedCollection new.
self allObjectsDo: [:obj | obj class == aClass ifTrue: [
oldInstances add: obj]].
+ oldInstances do: aBlock. "do the work"
- oldInstances do: [:inst | aBlock value: inst]. "do the work"
self copyFromRoots: arrayOfRoots sizeHint: segSize.
self extract.
withSymbols
ifTrue: [self writeToFileWithSymbols]
ifFalse: [self writeToFile].
!
Item was changed:
----- Method: ImageSegment>>ifOutPointer:thenAllObjectsDo: (in category 'instance change shape') -----
ifOutPointer: anObject thenAllObjectsDo: aBlock
| withSymbols segSize |
"If I point out to anObject, bring me in, Submit all my objects to the block. Write me out again."
(state = #onFile or: [state = #onFileWithSymbols]) ifFalse: [^ self].
withSymbols := state = #onFileWithSymbols.
(outPointers includes: anObject) ifFalse: [^ self].
state = #onFile ifTrue: [Cursor read showWhile: [self readFromFile]].
segSize := segment size.
self install.
+ self allObjectsDo: aBlock. "do the work"
- self allObjectsDo: [:obj | aBlock value: obj]. "do the work"
self copyFromRoots: arrayOfRoots sizeHint: segSize.
self extract.
withSymbols
ifTrue: [self writeToFileWithSymbols]
ifFalse: [self writeToFile].
!
Item was changed:
----- Method: MczInstaller>>useNewChangeSetDuring: (in category 'utilities') -----
useNewChangeSetDuring: aBlock
| changeHolder oldChanges newChanges |
changeHolder := (ChangeSet respondsTo: #newChanges:)
ifTrue: [ChangeSet]
ifFalse: [Smalltalk].
oldChanges := (ChangeSet respondsTo: #current)
ifTrue: [ChangeSet current]
ifFalse: [Smalltalk changes].
newChanges := ChangeSet new name: (ChangeSet uniqueNameLike: self extractPackageName).
changeHolder newChanges: newChanges.
+ aBlock ensure: [changeHolder newChanges: oldChanges].!
- [aBlock value] ensure: [changeHolder newChanges: oldChanges].!
Item was changed:
----- Method: Preferences class>>parameterAt:ifAbsent: (in category 'parameters') -----
parameterAt: aKey ifAbsent: aBlock
"Answer the parameter saved at the given key; if there is no such key in the Parameters dictionary, evaluate aBlock"
+ ^ Parameters at: aKey ifAbsent: aBlock!
- ^ Parameters at: aKey ifAbsent: [aBlock value]!
Item was changed:
----- Method: Project>>projectParameterAt:ifAbsent: (in category 'project parameters') -----
projectParameterAt: aSymbol ifAbsent: aBlock
"Answer the project parameter stored at the given symbol, or the result of evaluating the block"
+ ^ self projectParameters at: aSymbol ifAbsent: aBlock!
- ^ self projectParameters at: aSymbol ifAbsent: [aBlock value]!
Item was changed:
----- Method: Project>>projectPreferenceAt:ifAbsent: (in category 'project parameters') -----
projectPreferenceAt: aSymbol ifAbsent: aBlock
"Answer the project preference stored at the given symbol, or the result of evaluating the block"
+ ^ self projectPreferenceFlagDictionary at: aSymbol ifAbsent: aBlock!
- ^ self projectPreferenceFlagDictionary at: aSymbol ifAbsent: [aBlock value]!
Item was changed:
----- Method: Project>>withChildrenDo: (in category 'accessing') -----
withChildrenDo: aBlock
"Evaluate the block first with the receiver as argument, then, recursively and depth first, with each of the receiver's children as argument"
aBlock value: self.
self children do: [:p |
+ p withChildrenDo: aBlock ]!
- p withChildrenDo:
- [:c | aBlock value: c]]!
Item was changed:
----- Method: SystemChangeNotifier>>doSilently: (in category 'public') -----
doSilently: aBlock
"Perform the block, and ensure that no system notification are broadcasted while doing so."
| result |
silenceLevel := silenceLevel + 1.
+ result := aBlock ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].
- result := [aBlock value] ensure: [silenceLevel > 0 ifTrue: [silenceLevel := silenceLevel - 1]].
^ result.!
Item was changed:
----- Method: SystemNavigation>>allBehaviorsDo: (in category 'query') -----
allBehaviorsDo: aBlock
"Evaluate the argument, aBlock, for each kind of Behavior in the system
(that is, Object and its subclasses and Traits).
ar 7/15/1999: The code below will not enumerate any obsolete or anonymous
behaviors for which the following should be executed:
Smalltalk allObjectsDo:[:obj| obj isBehavior ifTrue:[aBlock value: obj]].
but what follows is way faster than enumerating all objects."
Class rootsOfTheWorld do:
[:root|
root withAllSubclassesDo:
[:class|
class isMeta ifFalse: "The metaclasses are rooted at Class; don't include them twice."
[aBlock value: class; value: class class]]].
+ ClassDescription allTraitsDo: aBlock!
- ClassDescription allTraitsDo:
- [:trait | aBlock value: trait]!
Levente Uzonyi uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-ul.29.mcz
==================== Summary ====================
Name: ToolBuilder-MVC-ul.29
Author: ul
Time: 3 August 2011, 1:53:39.126 am
UUID: d564a8fe-9edd-3e48-863d-978494abdf3e
Ancestors: ToolBuilder-MVC-kb.28
Removed unnecessary blocks.
=============== Diff against ToolBuilder-MVC-kb.28 ===============
Item was changed:
----- Method: MVCUIManager>>informUser:during: (in category 'ui requests') -----
informUser: aString during: aBlock
"Display a message above (or below if insufficient room) the cursor
during execution of the given block.
UIManager default informUser: 'Just a sec!!' during: [(Delay forSeconds: 1) wait].
"
(SelectionMenu labels: '')
displayAt: Sensor cursorPoint
withCaption: aString
+ during: aBlock!
- during: [aBlock value]!
Levente Uzonyi uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-ul.32.mcz
==================== Summary ====================
Name: Sound-ul.32
Author: ul
Time: 3 August 2011, 1:51:54.523 am
UUID: a2095fc2-ab98-f74d-b1cf-5f44a9f922a0
Ancestors: Sound-bf.31
Removed unnecessary blocks.
=============== Diff against Sound-bf.31 ===============
Item was changed:
----- Method: SequentialSound>>transformSounds: (in category 'copying') -----
transformSounds: tfmBlock
"Private!! Support for copying. Copy my component sounds."
+ sounds := sounds collect: tfmBlock
- sounds := sounds collect: [:s | tfmBlock value: s].
!
Levente Uzonyi uploaded a new version of Protocols to project The Trunk:
http://source.squeak.org/trunk/Protocols-ul.38.mcz
==================== Summary ====================
Name: Protocols-ul.38
Author: ul
Time: 3 August 2011, 1:51:01.014 am
UUID: e04559d5-f962-f641-8d94-6b34c15c3485
Ancestors: Protocols-cmm.37
Removed unnecessary blocks.
=============== Diff against Protocols-cmm.37 ===============
Item was changed:
----- Method: Lexicon>>selectImplementedMessageAndEvaluate: (in category 'selection') -----
selectImplementedMessageAndEvaluate: aBlock
"Allow the user to choose one selector, chosen from the currently selected message's selector, as well as those of all messages sent by it, and evaluate aBlock on behalf of chosen selector. If there is only one possible choice, simply make it; if there are multiple choices, put up a menu, and evaluate aBlock on behalf of the the chosen selector, doing nothing if the user declines to choose any. In this variant, only selectors "
| selector method messages |
(selector := self selectedMessageName) ifNil: [^ self].
method := (self selectedClassOrMetaClass ifNil: [^ self])
compiledMethodAt: selector
ifAbsent: [].
(method isNil or: [(messages := method messages) size = 0])
ifTrue: [^ aBlock value: selector].
(messages size = 1 and: [messages includes: selector])
ifTrue:
[^ aBlock value: selector]. "If only one item, there is no choice"
messages := messages select: [:aSelector | currentVocabulary includesSelector: aSelector forInstance: self targetObject ofClass: targetClass limitClass: limitClass].
self systemNavigation
showMenuOf: messages
withFirstItem: selector
+ ifChosenDo: aBlock!
- ifChosenDo: [:sel | aBlock value: sel]!
Item was changed:
----- Method: ScreenedVocabulary>>categoryListForInstance:ofClass:limitClass: (in category 'enumeration') -----
categoryListForInstance: anObject ofClass: aClass limitClass: mostGenericClass
"Answer the category list for the given object/class, considering only code implemented in mostGenericClass and lower"
+ ^(super categoryListForInstance: anObject ofClass: aClass limitClass: mostGenericClass)
+ select: categoryScreeningBlock!
- ^ (super categoryListForInstance: anObject ofClass: aClass limitClass: mostGenericClass) select:
- [:aCategory | categoryScreeningBlock value: aCategory]!
Item was changed:
----- Method: Vocabulary>>methodInterfaceAt:ifAbsent: (in category 'queries') -----
methodInterfaceAt: aSelector ifAbsent: aBlock
"Answer the vocabulary's method interface for the given selector; if absent, return the result of evaluating aBlock"
+ ^methodInterfaces at: aSelector ifAbsent: aBlock!
- ^ methodInterfaces at: aSelector ifAbsent: [aBlock value]!